mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix kind 1 querying logic
This commit is contained in:
parent
f1e9eb4f4c
commit
d2df6721bd
1 changed files with 8 additions and 7 deletions
|
|
@ -32,13 +32,14 @@ const importUsers = async (
|
|||
await Promise.all(relays.map(async (relay) => {
|
||||
if (!relay.startsWith('wss://')) console.error(`Invalid relay url ${relay}`);
|
||||
const conn = new NRelay1(relay);
|
||||
|
||||
const matched = [
|
||||
...await conn.query([{ kinds: [0, 3], authors, limit: 1000 }]),
|
||||
...(!profilesOnly ? [] : await conn.query(
|
||||
const matched = await conn.query([{ kinds: [0, 3], authors, limit: 1000 }]);
|
||||
if (!profilesOnly) {
|
||||
matched.push(
|
||||
...await conn.query(
|
||||
authors.map((author) => ({ kinds: [1], authors: [author], limit: 200 })),
|
||||
)),
|
||||
];
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
await conn.close();
|
||||
await Promise.all(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue