polfan-server-js-client 0.2.88 → 0.2.89

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.
@@ -4,7 +4,7 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="TopicHistoryWindow retainRatio and event handling improvements">
7
+ <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Remove removed message from Topic last message">
8
8
  <change beforePath="$PROJECT_DIR$/src/state-tracker/RoomsManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/RoomsManager.ts" afterDir="false" />
9
9
  </list>
10
10
  <option name="SHOW_DIALOG" value="false" />
@@ -190,15 +190,7 @@
190
190
  <workItem from="1776327180094" duration="5055000" />
191
191
  <workItem from="1777136687009" duration="3369000" />
192
192
  <workItem from="1777301595900" duration="1696000" />
193
- <workItem from="1778067371586" duration="1297000" />
194
- </task>
195
- <task id="LOCAL-00038" summary="Dedicated event for user status change">
196
- <option name="closed" value="true" />
197
- <created>1751551734548</created>
198
- <option name="number" value="00038" />
199
- <option name="presentableId" value="LOCAL-00038" />
200
- <option name="project" value="LOCAL" />
201
- <updated>1751551734548</updated>
193
+ <workItem from="1778067371586" duration="2266000" />
202
194
  </task>
203
195
  <task id="LOCAL-00039" summary="Fix update the latest message in a room default topic">
204
196
  <option name="closed" value="true" />
@@ -584,7 +576,15 @@
584
576
  <option name="project" value="LOCAL" />
585
577
  <updated>1777303294829</updated>
586
578
  </task>
587
- <option name="localTasksCounter" value="87" />
579
+ <task id="LOCAL-00087" summary="Remove removed message from Topic last message">
580
+ <option name="closed" value="true" />
581
+ <created>1778068934825</created>
582
+ <option name="number" value="00087" />
583
+ <option name="presentableId" value="LOCAL-00087" />
584
+ <option name="project" value="LOCAL" />
585
+ <updated>1778068934825</updated>
586
+ </task>
587
+ <option name="localTasksCounter" value="88" />
588
588
  <servers />
589
589
  </component>
590
590
  <component name="TypeScriptGeneratedFilesManager">
@@ -602,7 +602,6 @@
602
602
  </option>
603
603
  </component>
604
604
  <component name="VcsManagerConfiguration">
605
- <MESSAGE value="Fix websocket state error handling" />
606
605
  <MESSAGE value="Collection integration with React JS rework" />
607
606
  <MESSAGE value="Update deps and improve library building" />
608
607
  <MESSAGE value="Improvements and fixes to collection mirroring" />
@@ -627,7 +626,8 @@
627
626
  <MESSAGE value="Fix emitting event with deleted topics" />
628
627
  <MESSAGE value="Adjust to ban changes" />
629
628
  <MESSAGE value="TopicHistoryWindow retainRatio and event handling improvements" />
630
- <option name="LAST_COMMIT_MESSAGE" value="TopicHistoryWindow retainRatio and event handling improvements" />
629
+ <MESSAGE value="Remove removed message from Topic last message" />
630
+ <option name="LAST_COMMIT_MESSAGE" value="Remove removed message from Topic last message" />
631
631
  </component>
632
632
  <component name="XSLT-Support.FileAssociations.UIState">
633
633
  <expand />
@@ -2640,17 +2640,16 @@ var RoomsManager = /*#__PURE__*/function () {
2640
2640
  }, {
2641
2641
  key: "handleMessagesRedacted",
2642
2642
  value: function handleMessagesRedacted(ev) {
2643
- // Remove redacted messages from topic.lastMessage
2643
+ // Remove redacted messages from topic and update metadata
2644
2644
  var topics = this.topics.get(ev.location.roomId);
2645
- var updatedTopics = topics.items.filter(function (topic) {
2645
+ var topic = topics === null || topics === void 0 ? void 0 : topics.get(ev.location.topicId);
2646
+ if (topic) {
2646
2647
  var _topic$lastMessage;
2647
- return ((_topic$lastMessage = topic.lastMessage) === null || _topic$lastMessage === void 0 ? void 0 : _topic$lastMessage.id) && ev.ids.includes(topic.lastMessage.id);
2648
- }).map(function (topic) {
2649
- return RoomsManager_objectSpread(RoomsManager_objectSpread({}, topic), {}, {
2650
- lastMessage: null
2651
- });
2652
- });
2653
- topics.set.apply(topics, RoomsManager_toConsumableArray(updatedTopics));
2648
+ topics.set(RoomsManager_objectSpread(RoomsManager_objectSpread({}, topic), {}, {
2649
+ messageCount: Math.max(topic.messageCount - ev.ids.length, 0),
2650
+ lastMessage: ev.ids.includes((_topic$lastMessage = topic.lastMessage) === null || _topic$lastMessage === void 0 ? void 0 : _topic$lastMessage.id) ? null : topic.lastMessage
2651
+ }));
2652
+ }
2654
2653
  }
2655
2654
  }]);
2656
2655
  }();