diff --git a/packages/app/src/router.ts b/packages/app/src/router.ts index 858ea16..801f26d 100644 --- a/packages/app/src/router.ts +++ b/packages/app/src/router.ts @@ -178,7 +178,7 @@ export class Router { Replies = (event: TrustedEvent) => this.FromRelays(this.getRelaysForPubkey(event.pubkey, RelayMode.Read)) - Quote = (event: TrustedEvent, value: string, relays = []) => { + Quote = (event: TrustedEvent, value: string, relays: string[] = []) => { const tag = event.tags.find(t => t[1] === value) const scenarios = [ this.ForPubkey(event.pubkey), diff --git a/packages/net/src/Sync.ts b/packages/net/src/Sync.ts index 31403cc..bb9ecde 100644 --- a/packages/net/src/Sync.ts +++ b/packages/net/src/Sync.ts @@ -170,7 +170,7 @@ export const pullWithoutNegentropy = async ({relays, filters, onEvent}: PullWith relays, filters: filters.filter(f => lt(f.since, until)).map(assoc('until', until)), closeOnEose: true, - onClose: () => { + onComplete: () => { done = !anyResults resolve() }, diff --git a/packages/util/src/Kinds.ts b/packages/util/src/Kinds.ts index 1d3d2c5..f3f5a54 100644 --- a/packages/util/src/Kinds.ts +++ b/packages/util/src/Kinds.ts @@ -16,10 +16,8 @@ export const DELETE = 5 export const REPOST = 6 export const REACTION = 7 export const BADGE_AWARD = 8 -export const CHAT_MESSAGE = 9 -export const CHAT_REPLY = 10 -export const GROUP_NOTE = 11 -export const GROUP_REPLY = 12 +export const MESSAGE = 9 +export const THREAD = 11 export const SEAL = 13 export const DIRECT_MESSAGE = 14 export const GENERIC_REPOST = 16 @@ -34,6 +32,7 @@ export const OTS = 1040 export const WRAP = 1059 export const WRAP_NIP04 = 1060 export const FILE_METADATA = 1063 +export const COMMENT = 1111 export const LIVE_CHAT_MESSAGE = 1311 export const GIT_PATCH = 1617 export const GIT_ISSUE = 1621 @@ -95,6 +94,7 @@ export const GROUP_DELETE_EVENT = 9005 export const GROUP_EDIT_STATUS = 9006 export const GROUP_CREATE = 9007 export const GROUP_JOIN = 9021 +export const GROUP_LEAVE = 9022 export const ZAP_GOAL = 9041 export const ZAP_REQUEST = 9734 export const ZAP_RESPONSE = 9735