Diego Mello 2022-03-03 18:35:54 -03:00
parent fb48b14e94
commit 8e73d1b70f
1 changed files with 10 additions and 3 deletions

View File

@ -103,9 +103,16 @@ export default class RoomSubscription {
} }
}; };
handleConnection = () => { handleConnection = async () => {
try {
reduxStore.dispatch(clearUserTyping()); reduxStore.dispatch(clearUserTyping());
RocketChat.loadMissedMessages({ rid: this.rid }).catch(e => console.log(e)); await RocketChat.loadMissedMessages({ rid: this.rid });
const _lastOpen = new Date();
this.read(_lastOpen);
this.lastOpen = _lastOpen;
} catch (e) {
log(e);
}
}; };
handleNotifyRoomReceived = protectedFunction((ddpMessage: IDDPMessage) => { handleNotifyRoomReceived = protectedFunction((ddpMessage: IDDPMessage) => {