fix: use kind 0 event for nostr joining block
This commit is contained in:
parent
90734196e5
commit
9bb62cf966
@ -204,15 +204,15 @@ export class MetadataController {
|
|||||||
|
|
||||||
if (userRelays.length === 0) return null
|
if (userRelays.length === 0) return null
|
||||||
|
|
||||||
// filter for finding user's first kind 1 event
|
// filter for finding user's first kind 0 event
|
||||||
const eventFilter: Filter = {
|
const eventFilter: Filter = {
|
||||||
kinds: [kinds.ShortTextNote],
|
kinds: [kinds.Metadata],
|
||||||
authors: [hexKey]
|
authors: [hexKey]
|
||||||
}
|
}
|
||||||
|
|
||||||
const pool = new SimplePool()
|
const pool = new SimplePool()
|
||||||
|
|
||||||
// find user's kind 1 events published on user's relays
|
// find user's kind 0 events published on user's relays
|
||||||
const events = await pool.querySync(userRelays, eventFilter)
|
const events = await pool.querySync(userRelays, eventFilter)
|
||||||
if (events && events.length) {
|
if (events && events.length) {
|
||||||
// sort events by created_at time in ascending order
|
// sort events by created_at time in ascending order
|
||||||
|
Loading…
Reference in New Issue
Block a user