mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-18 22:14:23 +01:00
fix kind 1 querying logic
This commit is contained in:
@@ -32,13 +32,14 @@ const importUsers = async (
|
|||||||
await Promise.all(relays.map(async (relay) => {
|
await Promise.all(relays.map(async (relay) => {
|
||||||
if (!relay.startsWith('wss://')) console.error(`Invalid relay url ${relay}`);
|
if (!relay.startsWith('wss://')) console.error(`Invalid relay url ${relay}`);
|
||||||
const conn = new NRelay1(relay);
|
const conn = new NRelay1(relay);
|
||||||
|
const matched = await conn.query([{ kinds: [0, 3], authors, limit: 1000 }]);
|
||||||
const matched = [
|
if (!profilesOnly) {
|
||||||
...await conn.query([{ kinds: [0, 3], authors, limit: 1000 }]),
|
matched.push(
|
||||||
...(!profilesOnly ? [] : await conn.query(
|
...await conn.query(
|
||||||
authors.map((author) => ({ kinds: [1], authors: [author], limit: 200 })),
|
authors.map((author) => ({ kinds: [1], authors: [author], limit: 200 })),
|
||||||
)),
|
),
|
||||||
];
|
);
|
||||||
|
}
|
||||||
|
|
||||||
await conn.close();
|
await conn.close();
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|||||||
Reference in New Issue
Block a user