From b5494798f90fc2ffeb4465cdd37a4c0e82bae954 Mon Sep 17 00:00:00 2001 From: Torjus Date: Fri, 27 Jul 2018 12:44:35 +0200 Subject: [PATCH] Add notification when files are shared --- app/lib/RoomClient.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/lib/RoomClient.js b/app/lib/RoomClient.js index 7ac80e3..d22ce01 100644 --- a/app/lib/RoomClient.js +++ b/app/lib/RoomClient.js @@ -1117,6 +1117,16 @@ export default class RoomClient this._dispatch( stateActions.addResponseMessage({ ...chatMessage, peerName })); + const toolAreaState = this._getState().toolarea; + + // Notify about the new file, unless the chat is open. + if (chatMessage.file && !(toolAreaState.toolAreaOpen && toolAreaState.currentToolTab === 'chat')) + { + this._dispatch( + requestActions.notify({ text: `${chatMessage.name} shared a file` }) + ); + } + break; }