diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index de3cb6bb7..4bf67f4c5 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -114,6 +114,10 @@ const RocketChat = { reduxStore.dispatch(setUser(ddpMessage.fields)); } + if (ddpMessage.cleared && user && user.id === ddpMessage.id) { + reduxStore.dispatch(setUser({ status: 'offline' })); + } + if (this._setUserTimer) { clearTimeout(this._setUserTimer); this._setUserTimer = null;