@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/index.d.cts CHANGED
@@ -207,6 +207,6 @@ interface MlsGlue {
207
207
  */
208
208
  declare function initMls(): Promise<MlsGlue>;
209
209
 
210
- declare const VERSION = "1.2.0";
210
+ declare const VERSION = "1.2.1";
211
211
 
212
212
  export { VERSION, initMls };
package/dist/index.d.ts CHANGED
@@ -207,6 +207,6 @@ interface MlsGlue {
207
207
  */
208
208
  declare function initMls(): Promise<MlsGlue>;
209
209
 
210
- declare const VERSION = "1.2.0";
210
+ declare const VERSION = "1.2.1";
211
211
 
212
212
  export { VERSION, initMls };
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  localStorageSessionStorage,
14
14
  memorySessionStorage,
15
15
  pb
16
- } from "./chunk-OZLVL7G2.js";
16
+ } from "./chunk-KJXRY4S3.js";
17
17
  export {
18
18
  BackendError,
19
19
  PalbeAnalytics,
package/dist/internal.cjs CHANGED
@@ -3718,6 +3718,11 @@ var MessageHub = class {
3718
3718
  };
3719
3719
  }
3720
3720
  };
3721
+ function decodeSenderDeviceId(sender) {
3722
+ if (sender.length === 0) return null;
3723
+ const id = decodeUtf8(sender);
3724
+ return id.length > 0 ? id : null;
3725
+ }
3721
3726
  var MessageDeliverySource = class {
3722
3727
  constructor(rt, engine, hub, registry, messageStore, deviceId, selfUserId) {
3723
3728
  this.rt = rt;
@@ -3850,11 +3855,12 @@ var MessageDeliverySource = class {
3850
3855
  const decoded = decodeEnvelope(received.data);
3851
3856
  const { text, clientMsgId, replyTo } = decoded;
3852
3857
  const isReaction = decoded.type === "reaction" && decoded.reaction != null;
3858
+ const senderDeviceId = row.sender_device_id ?? decodeSenderDeviceId(received.sender);
3853
3859
  const stored = {
3854
3860
  id: `${group.rfcGroupId}#${row.server_seq}`,
3855
3861
  direction: "incoming",
3856
3862
  text,
3857
- senderDeviceId: row.sender_device_id ?? null,
3863
+ senderDeviceId,
3858
3864
  epoch: row.epoch,
3859
3865
  serverSeq: row.server_seq,
3860
3866
  at: Date.now(),
@@ -3887,7 +3893,7 @@ var MessageDeliverySource = class {
3887
3893
  kind: "application",
3888
3894
  group,
3889
3895
  text,
3890
- senderDeviceId: row.sender_device_id ?? null,
3896
+ senderDeviceId,
3891
3897
  epoch: row.epoch,
3892
3898
  serverSeq: row.server_seq,
3893
3899
  receivedAt: /* @__PURE__ */ new Date(),
@@ -6773,7 +6779,7 @@ function defaultSessionStorage(key) {
6773
6779
  }
6774
6780
 
6775
6781
  // src/version.ts
6776
- var VERSION = "1.2.0";
6782
+ var VERSION = "1.2.1";
6777
6783
 
6778
6784
  // src/runtime.ts
6779
6785
  function buildRuntime(config) {