Skip to content

Commit

Permalink
feat: Read messages on room close to prevent fetching already seen me…
Browse files Browse the repository at this point in the history
…ssages (#5723)
  • Loading branch information
diegolmello authored Jun 5, 2024
1 parent 5728cba commit 92f784d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/methods/subscriptions/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export default class RoomSubscription {

unsubscribe = async () => {
console.log(`[RCRN] Unsubscribing from room ${this.rid}`);
readMessages(this.rid, new Date(), true).catch(e => console.log(e));
this.isAlive = false;
reduxStore.dispatch(unsubscribeRoom(this.rid));
if (this.promises) {
Expand Down

0 comments on commit 92f784d

Please sign in to comment.