polfan-server-js-client 0.2.50 → 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 +54 -50
- 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/src/types/src/schemes/events/Session.ts +1 -0
package/.idea/workspace.xml
CHANGED
|
@@ -4,10 +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$/src/state-tracker/RoomMessagesHistory.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/RoomMessagesHistory.ts" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/src/state-tracker/TopicHistoryWindow.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/TopicHistoryWindow.ts" afterDir="false" />
|
|
10
|
-
</list>
|
|
7
|
+
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Protocol version support" />
|
|
11
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
12
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
13
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -49,24 +46,24 @@
|
|
|
49
46
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
50
47
|
<option name="showLibraryContents" value="true" />
|
|
51
48
|
</component>
|
|
52
|
-
<component name="PropertiesComponent"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
<component name="PropertiesComponent">{
|
|
50
|
+
"keyToString": {
|
|
51
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
52
|
+
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
|
|
53
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
54
|
+
"git-widget-placeholder": "master",
|
|
55
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
56
|
+
"junie.onboarding.icon.badge.shown": "true",
|
|
57
|
+
"last_opened_file_path": "//wsl.localhost/Debian/home/jarek/polfan-js-client-library",
|
|
58
|
+
"node.js.detected.package.eslint": "true",
|
|
59
|
+
"node.js.detected.package.tslint": "true",
|
|
60
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
61
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
62
|
+
"nodejs_package_manager_path": "npm",
|
|
63
|
+
"ts.external.directory.path": "\\\\wsl.localhost\\Debian\\home\\jarek\\polfan-js-client-library\\node_modules\\typescript\\lib",
|
|
64
|
+
"vue.rearranger.settings.migration": "true"
|
|
68
65
|
}
|
|
69
|
-
}
|
|
66
|
+
}</component>
|
|
70
67
|
<component name="SharedIndexes">
|
|
71
68
|
<attachedChunks>
|
|
72
69
|
<set>
|
|
@@ -125,31 +122,14 @@
|
|
|
125
122
|
<workItem from="1753062168800" duration="4938000" />
|
|
126
123
|
<workItem from="1753441064452" duration="1184000" />
|
|
127
124
|
<workItem from="1753954931871" duration="14805000" />
|
|
128
|
-
<workItem from="1754567895893" duration="
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
<updated>1738002786100</updated>
|
|
137
|
-
</task>
|
|
138
|
-
<task id="LOCAL-00008" summary="Emoticons support">
|
|
139
|
-
<option name="closed" value="true" />
|
|
140
|
-
<created>1738002805203</created>
|
|
141
|
-
<option name="number" value="00008" />
|
|
142
|
-
<option name="presentableId" value="LOCAL-00008" />
|
|
143
|
-
<option name="project" value="LOCAL" />
|
|
144
|
-
<updated>1738002805203</updated>
|
|
145
|
-
</task>
|
|
146
|
-
<task id="LOCAL-00009" summary="Emoticons support">
|
|
147
|
-
<option name="closed" value="true" />
|
|
148
|
-
<created>1738005832363</created>
|
|
149
|
-
<option name="number" value="00009" />
|
|
150
|
-
<option name="presentableId" value="LOCAL-00009" />
|
|
151
|
-
<option name="project" value="LOCAL" />
|
|
152
|
-
<updated>1738005832363</updated>
|
|
125
|
+
<workItem from="1754567895893" duration="6715000" />
|
|
126
|
+
<workItem from="1755450616809" duration="66000" />
|
|
127
|
+
<workItem from="1755452202060" duration="1749000" />
|
|
128
|
+
<workItem from="1755600989345" duration="1221000" />
|
|
129
|
+
<workItem from="1755609872522" duration="1114000" />
|
|
130
|
+
<workItem from="1756051973155" duration="2903000" />
|
|
131
|
+
<workItem from="1756461761500" duration="6231000" />
|
|
132
|
+
<workItem from="1756802984919" duration="379000" />
|
|
153
133
|
</task>
|
|
154
134
|
<task id="LOCAL-00010" summary="Emoticon permissions support">
|
|
155
135
|
<option name="closed" value="true" />
|
|
@@ -519,7 +499,31 @@
|
|
|
519
499
|
<option name="project" value="LOCAL" />
|
|
520
500
|
<updated>1754568882638</updated>
|
|
521
501
|
</task>
|
|
522
|
-
<
|
|
502
|
+
<task id="LOCAL-00056" summary="Ephemeral room history support">
|
|
503
|
+
<option name="closed" value="true" />
|
|
504
|
+
<created>1754573943778</created>
|
|
505
|
+
<option name="number" value="00056" />
|
|
506
|
+
<option name="presentableId" value="LOCAL-00056" />
|
|
507
|
+
<option name="project" value="LOCAL" />
|
|
508
|
+
<updated>1754573943778</updated>
|
|
509
|
+
</task>
|
|
510
|
+
<task id="LOCAL-00057" summary="Ephemeral room history support">
|
|
511
|
+
<option name="closed" value="true" />
|
|
512
|
+
<created>1756051989192</created>
|
|
513
|
+
<option name="number" value="00057" />
|
|
514
|
+
<option name="presentableId" value="LOCAL-00057" />
|
|
515
|
+
<option name="project" value="LOCAL" />
|
|
516
|
+
<updated>1756051989192</updated>
|
|
517
|
+
</task>
|
|
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" />
|
|
523
527
|
<servers />
|
|
524
528
|
</component>
|
|
525
529
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -537,8 +541,6 @@
|
|
|
537
541
|
</option>
|
|
538
542
|
</component>
|
|
539
543
|
<component name="VcsManagerConfiguration">
|
|
540
|
-
<MESSAGE value="UsersManager" />
|
|
541
|
-
<MESSAGE value="Client data and room stream support" />
|
|
542
544
|
<MESSAGE value="New collections mutationCounter property and map method remove" />
|
|
543
545
|
<MESSAGE value="Private rooms and space summaries" />
|
|
544
546
|
<MESSAGE value="Custom nicks support" />
|
|
@@ -562,6 +564,8 @@
|
|
|
562
564
|
<MESSAGE value="New member count field in RoomSummary" />
|
|
563
565
|
<MESSAGE value="Version bump" />
|
|
564
566
|
<MESSAGE value="RoomSummaryUpdated event support" />
|
|
565
|
-
<
|
|
567
|
+
<MESSAGE value="Ephemeral room history support" />
|
|
568
|
+
<MESSAGE value="Protocol version support" />
|
|
569
|
+
<option name="LAST_COMMIT_MESSAGE" value="Protocol version support" />
|
|
566
570
|
</component>
|
|
567
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);
|