@palbase/web 1.2.0 → 1.2.1

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/internal.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  createBoundClient,
7
7
  getRuntime,
8
8
  onConfigured
9
- } from "./chunk-OZLVL7G2.js";
9
+ } from "./chunk-KJXRY4S3.js";
10
10
  export {
11
11
  __configure,
12
12
  __registerNamespaces,
@@ -3519,6 +3519,11 @@ var MessageHub = class {
3519
3519
  };
3520
3520
  }
3521
3521
  };
3522
+ function decodeSenderDeviceId(sender) {
3523
+ if (sender.length === 0) return null;
3524
+ const id = decodeUtf8(sender);
3525
+ return id.length > 0 ? id : null;
3526
+ }
3522
3527
  var MessageDeliverySource = class {
3523
3528
  constructor(rt, engine, hub, registry, messageStore, deviceId, selfUserId) {
3524
3529
  this.rt = rt;
@@ -3651,11 +3656,12 @@ var MessageDeliverySource = class {
3651
3656
  const decoded = decodeEnvelope(received.data);
3652
3657
  const { text, clientMsgId, replyTo } = decoded;
3653
3658
  const isReaction = decoded.type === "reaction" && decoded.reaction != null;
3659
+ const senderDeviceId = row.sender_device_id ?? decodeSenderDeviceId(received.sender);
3654
3660
  const stored = {
3655
3661
  id: `${group.rfcGroupId}#${row.server_seq}`,
3656
3662
  direction: "incoming",
3657
3663
  text,
3658
- senderDeviceId: row.sender_device_id ?? null,
3664
+ senderDeviceId,
3659
3665
  epoch: row.epoch,
3660
3666
  serverSeq: row.server_seq,
3661
3667
  at: Date.now(),
@@ -3688,7 +3694,7 @@ var MessageDeliverySource = class {
3688
3694
  kind: "application",
3689
3695
  group,
3690
3696
  text,
3691
- senderDeviceId: row.sender_device_id ?? null,
3697
+ senderDeviceId,
3692
3698
  epoch: row.epoch,
3693
3699
  serverSeq: row.server_seq,
3694
3700
  receivedAt: /* @__PURE__ */ new Date(),
@@ -6574,7 +6580,7 @@ function defaultSessionStorage(key) {
6574
6580
  }
6575
6581
 
6576
6582
  // src/version.ts
6577
- var VERSION = "1.2.0";
6583
+ var VERSION = "1.2.1";
6578
6584
 
6579
6585
  // src/runtime.ts
6580
6586
  function buildRuntime(config) {