Avoid using the user's own relay list when publishing events

Sadly I think these relays are causing Ditto to lock up and stop working. This sucks
This commit is contained in:
Alex Gleason 2024-06-19 13:25:06 -05:00
parent 6ee9eb63d3
commit 875eee7a77
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -2,11 +2,11 @@ import { NStore } from '@nostrify/nostrify';
import { Conf } from '@/config.ts'; import { Conf } from '@/config.ts';
export async function getRelays(store: NStore, pubkey: string): Promise<Set<string>> { export async function getRelays(store: NStore, _pubkey: string): Promise<Set<string>> {
const relays = new Set<`wss://${string}`>(); const relays = new Set<`wss://${string}`>();
const events = await store.query([ const events = await store.query([
{ kinds: [10002], authors: [pubkey, Conf.pubkey], limit: 2 }, { kinds: [10002], authors: [/*pubkey, */ Conf.pubkey], limit: 2 },
]); ]);
for (const event of events) { for (const event of events) {