Skip to content

Commit

Permalink
Merge pull request #7 from hnzlmnn/raise-hand-msg-web
Browse files Browse the repository at this point in the history
add support for raise hand chat msg for web
  • Loading branch information
linuxpi committed Aug 30, 2020
2 parents a009d83 + 725e502 commit 295e2ac
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions react/features/toolbox/components/web/Toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '../../../analytics';
import { openDialog, toggleDialog } from '../../../base/dialog';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
import { translate, i18next } from '../../../base/i18n';
import {
IconChat,
IconCodeBlock,
Expand All @@ -28,14 +28,15 @@ import {
import {
getLocalParticipant,
getParticipants,
participantUpdated
participantUpdated,
getParticipantDisplayName
} from '../../../base/participants';
import { connect, equals } from '../../../base/redux';
import { OverflowMenuItem } from '../../../base/toolbox/components';
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
import { VideoBlurButton } from '../../../blur';
import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
import { EmbedMeetingDialog } from '../../../embed-meeting';
import { CHAT_SIZE, ChatCounter, toggleChat, sendMessage } from '../../../chat';
import { SharedDocumentButton } from '../../../etherpad';
import { openFeedbackDialog } from '../../../feedback';
import { beginAddPeople } from '../../../invite';
Expand Down Expand Up @@ -463,8 +464,12 @@ class Toolbox extends Component<Props, State> {
* @returns {void}
*/
_doToggleRaiseHand() {
const { _localParticipantID, _raisedHand } = this.props;
const { _localParticipantID, _raisedHand, _localParticipantName } = this.props;

// uncomment this to enable chat message on raise hand for web
// if(!_raisedHand) {
// this.props.dispatch(sendMessage(i18next.t('raisedHandMessage', {'name': _localParticipantName})));
// }
this.props.dispatch(participantUpdated({
// XXX Only the local participant is allowed to update without
// stating the JitsiConference instance (i.e. participant property
Expand Down Expand Up @@ -846,6 +851,7 @@ class Toolbox extends Component<Props, State> {
{ enable: !this.props._raisedHand }));

this._doToggleRaiseHand();

}

_onToolbarToggleScreenshare: () => void;
Expand Down Expand Up @@ -1441,6 +1447,7 @@ function _mapStateToProps(state) {
_fullScreen: fullScreen,
_tileViewEnabled: shouldDisplayTileView(state),
_localParticipantID: localParticipant.id,
_localParticipantName: getParticipantDisplayName(state, localParticipant.id),
_localRecState: localRecordingStates,
_locked: locked,
_overflowMenuVisible: overflowMenuVisible,
Expand Down

0 comments on commit 295e2ac

Please sign in to comment.