From 255254c28517b03d0bb9ee38b4442c91366b2fc7 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 26 Mar 2020 13:59:11 -0300 Subject: [PATCH] [FIX] Ignore self typing event (#1950) Co-authored-by: Diego Mello --- app/lib/methods/subscriptions/room.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/lib/methods/subscriptions/room.js b/app/lib/methods/subscriptions/room.js index ff4835061..e00bb1124 100644 --- a/app/lib/methods/subscriptions/room.js +++ b/app/lib/methods/subscriptions/room.js @@ -82,11 +82,14 @@ export default class RoomSubscription { return; } if (ev === 'typing') { + const { user } = reduxStore.getState().login; const [username, typing] = ddpMessage.fields.args; - if (typing) { - reduxStore.dispatch(addUserTyping(username)); - } else { - reduxStore.dispatch(removeUserTyping(username)); + if (username !== user.username) { + if (typing) { + reduxStore.dispatch(addUserTyping(username)); + } else { + reduxStore.dispatch(removeUserTyping(username)); + } } } else if (ev === 'deleteMessage') { InteractionManager.runAfterInteractions(async() => {