Merge pull request #10848 from mariogasparoni/v2.2.x-release
Fix audio modal buttons (MIC/LISTEN) after errors AND prevent Error 1006 when user has two or more occurrences of ':'
This commit is contained in:
commit
aaf3878a4d
@ -145,10 +145,13 @@ class SIPSession {
|
||||
sessionToken,
|
||||
} = this.user;
|
||||
|
||||
const encodedName =
|
||||
btoa && name ? btoa(name) : name;
|
||||
|
||||
const callerIdName = [
|
||||
`${userId}_${getAudioSessionNumber()}`,
|
||||
'bbbID',
|
||||
isListenOnly ? `LISTENONLY-${name}` : name,
|
||||
isListenOnly ? `LISTENONLY-${encodedName}` : encodedName,
|
||||
].join('-').replace(/"/g, "'");
|
||||
|
||||
this.user.callerIdName = callerIdName;
|
||||
|
@ -183,6 +183,7 @@ class AudioModal extends Component {
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { autoplayBlocked, closeModal } = this.props;
|
||||
|
||||
if (autoplayBlocked !== prevProps.autoplayBlocked) {
|
||||
autoplayBlocked ? this.setState({ content: 'autoplayBlocked' }) : closeModal();
|
||||
}
|
||||
@ -246,13 +247,14 @@ class AudioModal extends Component {
|
||||
|
||||
const {
|
||||
joinEchoTest,
|
||||
isConnecting,
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
disableActions,
|
||||
} = this.state;
|
||||
|
||||
if (disableActions) return;
|
||||
if (disableActions && isConnecting) return;
|
||||
|
||||
this.setState({
|
||||
hasError: false,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import VoiceUsers from '/imports/api/voice-users';
|
||||
import Users from '/imports/api/users'
|
||||
import Auth from '/imports/ui/services/auth';
|
||||
import { debounce } from 'lodash';
|
||||
import TalkingIndicator from './component';
|
||||
@ -36,12 +37,16 @@ export default withTracker(() => {
|
||||
callerName, talking, color, voiceUserId, muted, intId,
|
||||
} = usersTalking[i];
|
||||
|
||||
const user = Users.findOne({ userId: voiceUserId });
|
||||
|
||||
const _name = user ? user.name : 'USER';
|
||||
|
||||
talkers[`${intId}`] = {
|
||||
color,
|
||||
talking,
|
||||
voiceUserId,
|
||||
muted,
|
||||
callerName,
|
||||
callerName: _name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user