Index client addr in search extensions

This commit is contained in:
Alex Gleason 2025-04-03 12:38:39 -05:00
parent 621d92dcf6
commit 1c2d7a6793
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -522,6 +522,12 @@ export class DittoPgStore extends NPostgres {
}
}
const client = event.tags.find(([name]) => name === 'client')?.[2];
if (client && /^31990:([0-9a-f]{64}):(.+)$/.test(client)) {
ext.client = client;
}
ext.protocol = event.tags.find(([name]) => name === 'proxy')?.[2] ?? 'nostr';
return ext;