nostr-double-ratchet 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Invite.d.ts.map +1 -1
- package/dist/Session.d.ts.map +1 -1
- package/dist/nostr-double-ratchet.es.js +900 -905
- package/dist/nostr-double-ratchet.umd.js +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Invite.ts +16 -17
- package/src/Session.ts +2 -4
- package/src/types.ts +2 -0
package/src/Session.ts
CHANGED
|
@@ -130,7 +130,7 @@ export class Session {
|
|
|
130
130
|
content: encryptedData,
|
|
131
131
|
kind: MESSAGE_EVENT_KIND,
|
|
132
132
|
tags: [["header", encryptedHeader]],
|
|
133
|
-
created_at: Math.floor(
|
|
133
|
+
created_at: Math.floor(now / 1000)
|
|
134
134
|
}, this.state.ourCurrentNostrKey.privateKey);
|
|
135
135
|
|
|
136
136
|
return {event: nostrEvent, innerEvent: rumor as Rumor};
|
|
@@ -250,10 +250,8 @@ export class Session {
|
|
|
250
250
|
// Check if we have any remaining skipped messages from this sender
|
|
251
251
|
const hasMoreSkippedMessages = Object.keys(this.state.skippedMessageKeys).some(k => k.startsWith(`${nostrSender}:`));
|
|
252
252
|
if (!hasMoreSkippedMessages) {
|
|
253
|
-
// Clean up header keys
|
|
253
|
+
// Clean up header keys as no more skipped messages from this sender
|
|
254
254
|
delete this.state.skippedHeaderKeys[nostrSender];
|
|
255
|
-
this.nostrUnsubscribe?.();
|
|
256
|
-
this.nostrUnsubscribe = undefined;
|
|
257
255
|
}
|
|
258
256
|
|
|
259
257
|
return nip44.decrypt(ciphertext, mk);
|