polfan-server-js-client 0.2.65 → 0.2.66

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.
@@ -83,7 +83,6 @@ export declare class TopicHistoryWindow extends TraversableRemoteCollection<Mess
83
83
  */
84
84
  _updateMessageReference(refTopic: Topic): void;
85
85
  private handleNewMessage;
86
- private handleSession;
87
86
  protected fetchItemsAfter(): Promise<Message[] | null>;
88
87
  protected fetchItemsBefore(): Promise<Message[] | null>;
89
88
  protected fetchLatestItems(): Promise<Message[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polfan-server-js-client",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "description": "JavaScript client library for handling communication with Polfan chat server.",
5
5
  "author": "Jarosław Żak",
6
6
  "license": "MIT",
@@ -1,6 +1,5 @@
1
1
  import {ChatStateTracker} from "./ChatStateTracker";
2
2
  import {
3
- ChatLocation,
4
3
  NewMessage,
5
4
  FollowedTopic,
6
5
  TopicFollowed,
@@ -222,7 +222,6 @@ export class TopicHistoryWindow extends TraversableRemoteCollection<Message> {
222
222
  this.internalState.traverseLock = false;
223
223
 
224
224
  if (bindEvents) {
225
- this.tracker.client.on('Session', ev => this.handleSession(ev));
226
225
  this.tracker.client.on('NewMessage', ev => this.handleNewMessage(ev));
227
226
  }
228
227
  }
@@ -291,16 +290,6 @@ export class TopicHistoryWindow extends TraversableRemoteCollection<Message> {
291
290
  }
292
291
  }
293
292
 
294
- private handleSession(ev: Session): void {
295
- const rooms = ev.state.rooms;
296
-
297
- if (rooms.find(room => room.id === this.roomId)) {
298
- void this.resetToLatest();
299
- } else {
300
- this.deleteAll();
301
- }
302
- }
303
-
304
293
  protected async fetchItemsAfter(): Promise<Message[] | null> {
305
294
  const afterId = this.getAt(this.length - 1)?.id;
306
295