@droponair/sdk-js 0.24.1 → 0.24.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.24.2
4
+
5
+ - Fix: E2EE group message decryption failed because the decrypt AAD bound `recipientId` to the group id instead of the receiving user's own id (which is what the sender encrypts against). Now matches the sender and the other SDKs. Requires sdk-be that preserves the sender timestamp on group notifications.
6
+
3
7
  ## 0.24.1
4
8
 
5
9
  - Fix: incoming frame classifier misrouted server-pushed Event and Broadcast frames as group messages (protobuf field overlap), so `onBroadcast` never fired and events like `LIMIT_REACHED` were swallowed. Event is now probed with a strict type check before group/broadcast/ack, and group notifications additionally require `senderDeviceId`.
@@ -1580,7 +1580,12 @@ class MessagingClient {
1580
1580
  plaintext = await this.cryptoService.decrypt(myPayload.encryptedPayload, sharedKey, {
1581
1581
  messageId: notif.messageId,
1582
1582
  senderId: notif.fromUserId,
1583
- recipientId: notif.groupId,
1583
+ // AAD recipientId is the receiving user's own id — this MUST match the
1584
+ // sender's encrypt AAD, which binds recipientId to the target member's
1585
+ // userId (memberId). Using notif.groupId here (the previous value) never
1586
+ // matched, so E2EE group messages failed GCM auth on decrypt. android /
1587
+ // ios / unity already bind this to the recipient's own id.
1588
+ recipientId: this.currentUserId,
1584
1589
  timestamp: notif.timestamp,
1585
1590
  });
1586
1591
  }
package/dist/version.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
8
8
  * PATCH, bug-fix / perf improvement with no wire or API change
9
9
  */
10
- export declare const SDK_VERSION = "0.24.1";
10
+ export declare const SDK_VERSION = "0.24.2";
11
11
  /**
12
12
  * Binary encrypted-payload format version.
13
13
  * Included as the first byte of every encrypted payload so receivers can
package/dist/version.js CHANGED
@@ -10,7 +10,7 @@ exports.PROTOCOL_VERSION = exports.PAYLOAD_FORMAT_VERSION = exports.SDK_VERSION
10
10
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
11
11
  * PATCH, bug-fix / perf improvement with no wire or API change
12
12
  */
13
- exports.SDK_VERSION = '0.24.1';
13
+ exports.SDK_VERSION = '0.24.2';
14
14
  /**
15
15
  * Binary encrypted-payload format version.
16
16
  * Included as the first byte of every encrypted payload so receivers can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droponair/sdk-js",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "DropOnAir SDK for end-to-end encrypted messaging",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",