@liveblocks/core 1.11.0 → 1.12.0-test1

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.mjs CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "1.11.0";
9
+ var PKG_VERSION = "1.12.0-test1";
10
10
  var PKG_FORMAT = "esm";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -2031,6 +2031,18 @@ function convertToCommentUserReaction(data) {
2031
2031
  function convertToInboxNotificationData(data) {
2032
2032
  const notifiedAt = new Date(data.notifiedAt);
2033
2033
  const readAt = data.readAt ? new Date(data.readAt) : null;
2034
+ if ("activities" in data) {
2035
+ const activities = data.activities.map((activity) => ({
2036
+ ...activity,
2037
+ createdAt: new Date(activity.createdAt)
2038
+ }));
2039
+ return {
2040
+ ...data,
2041
+ notifiedAt,
2042
+ readAt,
2043
+ activities
2044
+ };
2045
+ }
2034
2046
  return {
2035
2047
  ...data,
2036
2048
  notifiedAt,
@@ -6608,7 +6620,7 @@ function createClientStore() {
6608
6620
  threads: deleteKeyImmutable(state.threads, threadId),
6609
6621
  inboxNotifications: Object.fromEntries(
6610
6622
  Object.entries(state.inboxNotifications).filter(
6611
- ([_id, notification]) => notification.threadId !== threadId
6623
+ ([_id, notification]) => notification.kind === "thread" && notification.threadId !== threadId
6612
6624
  )
6613
6625
  )
6614
6626
  };
@@ -6750,7 +6762,7 @@ function applyOptimisticUpdates(state) {
6750
6762
  optimisticUpdate.comment
6751
6763
  );
6752
6764
  const inboxNotification = Object.values(result.inboxNotifications).find(
6753
- (notification) => notification.threadId === thread.id
6765
+ (notification) => notification.kind === "thread" && notification.threadId !== thread.id
6754
6766
  );
6755
6767
  if (inboxNotification === void 0) {
6756
6768
  break;
@@ -8112,6 +8124,7 @@ export {
8112
8124
  fancy_console_exports as console,
8113
8125
  convertToCommentData,
8114
8126
  convertToCommentUserReaction,
8127
+ convertToInboxNotificationData,
8115
8128
  convertToThreadData,
8116
8129
  createClient,
8117
8130
  deleteComment,