polfan-server-js-client 0.2.51 → 0.2.52
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/.idea/workspace.xml +15 -17
- package/build/index.cjs.js +15 -0
- package/build/index.cjs.js.map +1 -1
- package/build/index.umd.js +1 -1
- package/build/index.umd.js.map +1 -1
- package/build/types/types/src/schemes/events/Session.d.ts +1 -0
- package/package.json +1 -1
- package/src/state-tracker/RoomsManager.ts +12 -0
package/.idea/workspace.xml
CHANGED
|
@@ -4,11 +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="
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/src/types" beforeDir="false" afterPath="$PROJECT_DIR$/src/types" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/src/types/src/schemes/events/Session.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/types/src/schemes/events/Session.ts" afterDir="false" />
|
|
11
|
-
</list>
|
|
7
|
+
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Protocol version support" />
|
|
12
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
13
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
14
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -131,15 +127,9 @@
|
|
|
131
127
|
<workItem from="1755452202060" duration="1749000" />
|
|
132
128
|
<workItem from="1755600989345" duration="1221000" />
|
|
133
129
|
<workItem from="1755609872522" duration="1114000" />
|
|
134
|
-
<workItem from="1756051973155" duration="
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<option name="closed" value="true" />
|
|
138
|
-
<created>1738005832363</created>
|
|
139
|
-
<option name="number" value="00009" />
|
|
140
|
-
<option name="presentableId" value="LOCAL-00009" />
|
|
141
|
-
<option name="project" value="LOCAL" />
|
|
142
|
-
<updated>1738005832363</updated>
|
|
130
|
+
<workItem from="1756051973155" duration="2903000" />
|
|
131
|
+
<workItem from="1756461761500" duration="6231000" />
|
|
132
|
+
<workItem from="1756802984919" duration="379000" />
|
|
143
133
|
</task>
|
|
144
134
|
<task id="LOCAL-00010" summary="Emoticon permissions support">
|
|
145
135
|
<option name="closed" value="true" />
|
|
@@ -525,7 +515,15 @@
|
|
|
525
515
|
<option name="project" value="LOCAL" />
|
|
526
516
|
<updated>1756051989192</updated>
|
|
527
517
|
</task>
|
|
528
|
-
<
|
|
518
|
+
<task id="LOCAL-00058" summary="Protocol version support">
|
|
519
|
+
<option name="closed" value="true" />
|
|
520
|
+
<created>1756053336494</created>
|
|
521
|
+
<option name="number" value="00058" />
|
|
522
|
+
<option name="presentableId" value="LOCAL-00058" />
|
|
523
|
+
<option name="project" value="LOCAL" />
|
|
524
|
+
<updated>1756053336494</updated>
|
|
525
|
+
</task>
|
|
526
|
+
<option name="localTasksCounter" value="59" />
|
|
529
527
|
<servers />
|
|
530
528
|
</component>
|
|
531
529
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -543,7 +541,6 @@
|
|
|
543
541
|
</option>
|
|
544
542
|
</component>
|
|
545
543
|
<component name="VcsManagerConfiguration">
|
|
546
|
-
<MESSAGE value="Client data and room stream support" />
|
|
547
544
|
<MESSAGE value="New collections mutationCounter property and map method remove" />
|
|
548
545
|
<MESSAGE value="Private rooms and space summaries" />
|
|
549
546
|
<MESSAGE value="Custom nicks support" />
|
|
@@ -568,6 +565,7 @@
|
|
|
568
565
|
<MESSAGE value="Version bump" />
|
|
569
566
|
<MESSAGE value="RoomSummaryUpdated event support" />
|
|
570
567
|
<MESSAGE value="Ephemeral room history support" />
|
|
571
|
-
<
|
|
568
|
+
<MESSAGE value="Protocol version support" />
|
|
569
|
+
<option name="LAST_COMMIT_MESSAGE" value="Protocol version support" />
|
|
572
570
|
</component>
|
|
573
571
|
</project>
|
package/build/index.cjs.js
CHANGED
|
@@ -1099,6 +1099,8 @@ class RoomsManager {
|
|
|
1099
1099
|
const member = members.get(ev.userId);
|
|
1100
1100
|
const newMember = ev.member;
|
|
1101
1101
|
const user = member.spaceMember?.user ?? member.user;
|
|
1102
|
+
|
|
1103
|
+
// Preserving user object, because it's not included in event
|
|
1102
1104
|
if (newMember.spaceMember) {
|
|
1103
1105
|
newMember.spaceMember.user = user;
|
|
1104
1106
|
} else {
|
|
@@ -1201,6 +1203,7 @@ class RoomsManager {
|
|
|
1201
1203
|
this.deferredSession.resolve();
|
|
1202
1204
|
}
|
|
1203
1205
|
handleUserUpdated(ev) {
|
|
1206
|
+
// Update room members users
|
|
1204
1207
|
this.members.items.forEach(members => {
|
|
1205
1208
|
const member = members.get(ev.user.id);
|
|
1206
1209
|
if (!member) {
|
|
@@ -1217,6 +1220,18 @@ class RoomsManager {
|
|
|
1217
1220
|
}
|
|
1218
1221
|
members.set(newMember);
|
|
1219
1222
|
});
|
|
1223
|
+
|
|
1224
|
+
// Update recipients users
|
|
1225
|
+
const newRooms = [];
|
|
1226
|
+
this.list.items.forEach(room => {
|
|
1227
|
+
if (room.recipients?.some(user => user.id === ev.user.id)) {
|
|
1228
|
+
room.recipients = room.recipients.map(user => user.id === ev.user.id ? ev.user : user);
|
|
1229
|
+
newRooms.push({
|
|
1230
|
+
...room
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
this.list.set(...newRooms);
|
|
1220
1235
|
}
|
|
1221
1236
|
handleNewMessage(ev) {
|
|
1222
1237
|
const topics = this.topics.get(ev.message.location.roomId);
|