@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.
@@ -3697,6 +3697,11 @@ var MessageHub = class {
3697
3697
  };
3698
3698
  }
3699
3699
  };
3700
+ function decodeSenderDeviceId(sender) {
3701
+ if (sender.length === 0) return null;
3702
+ const id = decodeUtf8(sender);
3703
+ return id.length > 0 ? id : null;
3704
+ }
3700
3705
  var MessageDeliverySource = class {
3701
3706
  constructor(rt, engine, hub, registry, messageStore, deviceId, selfUserId) {
3702
3707
  this.rt = rt;
@@ -3829,11 +3834,12 @@ var MessageDeliverySource = class {
3829
3834
  const decoded = decodeEnvelope(received.data);
3830
3835
  const { text, clientMsgId, replyTo } = decoded;
3831
3836
  const isReaction = decoded.type === "reaction" && decoded.reaction != null;
3837
+ const senderDeviceId = row.sender_device_id ?? decodeSenderDeviceId(received.sender);
3832
3838
  const stored = {
3833
3839
  id: `${group.rfcGroupId}#${row.server_seq}`,
3834
3840
  direction: "incoming",
3835
3841
  text,
3836
- senderDeviceId: row.sender_device_id ?? null,
3842
+ senderDeviceId,
3837
3843
  epoch: row.epoch,
3838
3844
  serverSeq: row.server_seq,
3839
3845
  at: Date.now(),
@@ -3866,7 +3872,7 @@ var MessageDeliverySource = class {
3866
3872
  kind: "application",
3867
3873
  group,
3868
3874
  text,
3869
- senderDeviceId: row.sender_device_id ?? null,
3875
+ senderDeviceId,
3870
3876
  epoch: row.epoch,
3871
3877
  serverSeq: row.server_seq,
3872
3878
  receivedAt: /* @__PURE__ */ new Date(),
@@ -6751,7 +6757,7 @@ function defaultSessionStorage(key) {
6751
6757
  }
6752
6758
 
6753
6759
  // src/version.ts
6754
- var VERSION = "1.2.0";
6760
+ var VERSION = "1.2.1";
6755
6761
 
6756
6762
  // src/runtime.ts
6757
6763
  function buildRuntime(config) {
@@ -7111,4 +7117,4 @@ export {
7111
7117
  pb,
7112
7118
  createBoundClient
7113
7119
  };
7114
- //# sourceMappingURL=chunk-OZLVL7G2.js.map
7120
+ //# sourceMappingURL=chunk-KJXRY4S3.js.map