@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.
@@ -7,7 +7,7 @@ import {
7
7
  __configure,
8
8
  endpointRefFromApiKey,
9
9
  getRuntime
10
- } from "../chunk-OZLVL7G2.js";
10
+ } from "../chunk-KJXRY4S3.js";
11
11
 
12
12
  // src/next/client.ts
13
13
  var SESSION_MAX_AGE_S = 2592e3;
@@ -3734,6 +3734,11 @@ var MessageHub = class {
3734
3734
  };
3735
3735
  }
3736
3736
  };
3737
+ function decodeSenderDeviceId(sender) {
3738
+ if (sender.length === 0) return null;
3739
+ const id = decodeUtf8(sender);
3740
+ return id.length > 0 ? id : null;
3741
+ }
3737
3742
  var MessageDeliverySource = class {
3738
3743
  constructor(rt, engine, hub, registry, messageStore, deviceId, selfUserId) {
3739
3744
  this.rt = rt;
@@ -3866,11 +3871,12 @@ var MessageDeliverySource = class {
3866
3871
  const decoded = decodeEnvelope(received.data);
3867
3872
  const { text, clientMsgId, replyTo } = decoded;
3868
3873
  const isReaction = decoded.type === "reaction" && decoded.reaction != null;
3874
+ const senderDeviceId = row.sender_device_id ?? decodeSenderDeviceId(received.sender);
3869
3875
  const stored = {
3870
3876
  id: `${group.rfcGroupId}#${row.server_seq}`,
3871
3877
  direction: "incoming",
3872
3878
  text,
3873
- senderDeviceId: row.sender_device_id ?? null,
3879
+ senderDeviceId,
3874
3880
  epoch: row.epoch,
3875
3881
  serverSeq: row.server_seq,
3876
3882
  at: Date.now(),
@@ -3903,7 +3909,7 @@ var MessageDeliverySource = class {
3903
3909
  kind: "application",
3904
3910
  group,
3905
3911
  text,
3906
- senderDeviceId: row.sender_device_id ?? null,
3912
+ senderDeviceId,
3907
3913
  epoch: row.epoch,
3908
3914
  serverSeq: row.server_seq,
3909
3915
  receivedAt: /* @__PURE__ */ new Date(),
@@ -6789,7 +6795,7 @@ function defaultSessionStorage(key) {
6789
6795
  }
6790
6796
 
6791
6797
  // src/version.ts
6792
- var VERSION = "1.2.0";
6798
+ var VERSION = "1.2.1";
6793
6799
 
6794
6800
  // src/runtime.ts
6795
6801
  function buildRuntime(config) {