fix(reactions) Updated list of reactions & disabled incoming message sound (#9550)

* Changed reactions

* Disable incoming message sound on reactions
This commit is contained in:
robertpin 2021-07-15 10:26:27 +03:00 committed by GitHub
parent 25b4887f74
commit 1223c63f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 21 deletions

View File

@ -805,6 +805,7 @@
"accessibilityLabel": { "accessibilityLabel": {
"audioOnly": "Toggle audio only", "audioOnly": "Toggle audio only",
"audioRoute": "Select the sound device", "audioRoute": "Select the sound device",
"boo": "Boo",
"callQuality": "Manage video quality", "callQuality": "Manage video quality",
"cc": "Toggle subtitles", "cc": "Toggle subtitles",
"chat": "Open / Close chat", "chat": "Open / Close chat",
@ -818,7 +819,7 @@
"hangup": "Leave the meeting", "hangup": "Leave the meeting",
"help": "Help", "help": "Help",
"invite": "Invite people", "invite": "Invite people",
"joy": "Laughing Crying", "joy": "Laugh",
"kick": "Kick participant", "kick": "Kick participant",
"like": "Thumbs Up", "like": "Thumbs Up",
"lobbyButton": "Enable/disable lobby mode", "lobbyButton": "Enable/disable lobby mode",
@ -850,7 +851,6 @@
"shareYourScreen": "Start / Stop sharing your screen", "shareYourScreen": "Start / Stop sharing your screen",
"shortcuts": "Toggle shortcuts", "shortcuts": "Toggle shortcuts",
"show": "Show on stage", "show": "Show on stage",
"smile": "Smile",
"speakerStats": "Toggle speaker statistics", "speakerStats": "Toggle speaker statistics",
"surprised": "Surprised", "surprised": "Surprised",
"tileView": "Toggle tile view", "tileView": "Toggle tile view",
@ -869,6 +869,7 @@
"audioOnlyOn": "Enable low bandwidth mode", "audioOnlyOn": "Enable low bandwidth mode",
"audioRoute": "Select the sound device", "audioRoute": "Select the sound device",
"authenticate": "Authenticate", "authenticate": "Authenticate",
"boo": "Boo",
"callQuality": "Manage video quality", "callQuality": "Manage video quality",
"chat": "Open / Close chat", "chat": "Open / Close chat",
"clap": "Clap", "clap": "Clap",
@ -887,7 +888,7 @@
"hangup": "Leave the meeting", "hangup": "Leave the meeting",
"help": "Help", "help": "Help",
"invite": "Invite people", "invite": "Invite people",
"joy": "Joy", "joy": "Laugh",
"like": "Thumbs Up", "like": "Thumbs Up",
"lobbyButtonDisable": "Disable lobby mode", "lobbyButtonDisable": "Disable lobby mode",
"lobbyButtonEnable": "Enable lobby mode", "lobbyButtonEnable": "Enable lobby mode",
@ -915,11 +916,11 @@
"profile": "Edit your profile", "profile": "Edit your profile",
"raiseHand": "Raise / Lower your hand", "raiseHand": "Raise / Lower your hand",
"raiseYourHand": "Raise your hand", "raiseYourHand": "Raise your hand",
"reactionBoo": "Send boo reaction",
"reactionClap": "Send clap reaction", "reactionClap": "Send clap reaction",
"reactionJoy": "Send joy reaction", "reactionJoy": "Send laugh reaction",
"reactionLike": "Send thumbs up reaction", "reactionLike": "Send thumbs up reaction",
"reactionParty": "Send party popper reaction", "reactionParty": "Send party popper reaction",
"reactionSmile": "Send smile reaction",
"reactionSurprised": "Send surprised reaction", "reactionSurprised": "Send surprised reaction",
"security": "Security options", "security": "Security options",
"Settings": "Settings", "Settings": "Settings",
@ -927,7 +928,6 @@
"sharedvideo": "Share video", "sharedvideo": "Share video",
"shareRoom": "Invite someone", "shareRoom": "Invite someone",
"shortcuts": "View shortcuts", "shortcuts": "View shortcuts",
"smile": "Smile",
"speakerStats": "Speaker stats", "speakerStats": "Speaker stats",
"startScreenSharing": "Start screen sharing", "startScreenSharing": "Start screen sharing",
"startSubtitles": "Start subtitles", "startSubtitles": "Start subtitles",

View File

@ -164,7 +164,7 @@ MiddlewareRegistry.register(store => next => action => {
message: action.message, message: action.message,
privateMessage: false, privateMessage: false,
timestamp: Date.now() timestamp: Date.now()
}); }, false);
} }
} }
@ -273,7 +273,7 @@ function _addChatMsgListener(conference, store) {
message: reactions[_id].message, message: reactions[_id].message,
privateMessage: false, privateMessage: false,
timestamp: eventData.timestamp timestamp: eventData.timestamp
}); }, false);
delete reactions[_id]; delete reactions[_id];
}, 500); }, 500);
} }
@ -308,14 +308,18 @@ function _handleChatError({ dispatch }, error) {
* *
* @param {Store} store - The Redux store. * @param {Store} store - The Redux store.
* @param {Object} message - The message object. * @param {Object} message - The message object.
* @param {boolean} shouldPlaySound - Whether or not to play the incoming message sound.
* @returns {void} * @returns {void}
*/ */
function _handleReceivedMessage({ dispatch, getState }, { id, message, privateMessage, timestamp }) { function _handleReceivedMessage({ dispatch, getState },
{ id, message, privateMessage, timestamp },
shouldPlaySound = true
) {
// Logic for all platforms: // Logic for all platforms:
const state = getState(); const state = getState();
const { isOpen: isChatOpen } = state['features/chat']; const { isOpen: isChatOpen } = state['features/chat'];
if (!isChatOpen) { if (shouldPlaySound && !isChatOpen) {
dispatch(playSound(INCOMING_MSG_SOUND_ID)); dispatch(playSound(INCOMING_MSG_SOUND_ID));
} }

View File

@ -1,24 +1,19 @@
// @flow // @flow
export const REACTIONS = { export const REACTIONS = {
clap: {
message: ':clap:',
emoji: '👏',
shortcutChar: 'C'
},
like: { like: {
message: ':thumbs_up:', message: ':thumbs_up:',
emoji: '👍', emoji: '👍',
shortcutChar: 'T' shortcutChar: 'T'
}, },
smile: { clap: {
message: ':smile:', message: ':clap:',
emoji: '😀', emoji: '👏',
shortcutChar: 'S' shortcutChar: 'C'
}, },
joy: { joy: {
message: ':joy:', message: ':grinning_face:',
emoji: '😂', emoji: '😀',
shortcutChar: 'L' shortcutChar: 'L'
}, },
surprised: { surprised: {
@ -26,6 +21,11 @@ export const REACTIONS = {
emoji: '😮', emoji: '😮',
shortcutChar: 'O' shortcutChar: 'O'
}, },
boo: {
message: ':slightly_frowning_face:',
emoji: '🙁',
shortcutChar: 'B'
},
party: { party: {
message: ':party_popper:', message: ':party_popper:',
emoji: '🎉', emoji: '🎉',