Update group membership for a group call when it changes
This commit is contained in:
parent
3f58a9b762
commit
db0ebc5779
3 changed files with 25 additions and 7 deletions
|
@ -553,6 +553,17 @@ export class CallingClass {
|
||||||
this.getGroupCall(conversationId)?.requestVideo(resolutions);
|
this.getGroupCall(conversationId)?.requestVideo(resolutions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public groupMembersChanged(conversationId: string): void {
|
||||||
|
// This will be called for any conversation change, so it's likely that there won't
|
||||||
|
// be a group call available; that's fine.
|
||||||
|
const groupCall = this.getGroupCall(conversationId);
|
||||||
|
if (!groupCall) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
groupCall.setGroupMembers(this.getGroupCallMembers(conversationId));
|
||||||
|
}
|
||||||
|
|
||||||
// See the comment in types/Calling.ts to explain why we have to do this conversion.
|
// See the comment in types/Calling.ts to explain why we have to do this conversion.
|
||||||
private convertRingRtcConnectionState(
|
private convertRingRtcConnectionState(
|
||||||
connectionState: ConnectionState
|
connectionState: ConnectionState
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
import { ThunkAction } from 'redux-thunk';
|
||||||
import {
|
import {
|
||||||
difference,
|
difference,
|
||||||
fromPairs,
|
fromPairs,
|
||||||
|
@ -14,6 +15,8 @@ import {
|
||||||
without,
|
without,
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
|
|
||||||
|
import { StateType as RootStateType } from '../reducer';
|
||||||
|
import { calling } from '../../services/calling';
|
||||||
import { getOwn } from '../../util/getOwn';
|
import { getOwn } from '../../util/getOwn';
|
||||||
import { trigger } from '../../shims/events';
|
import { trigger } from '../../shims/events';
|
||||||
import { NoopActionType } from './noop';
|
import { NoopActionType } from './noop';
|
||||||
|
@ -454,13 +457,17 @@ function conversationAdded(
|
||||||
function conversationChanged(
|
function conversationChanged(
|
||||||
id: string,
|
id: string,
|
||||||
data: ConversationType
|
data: ConversationType
|
||||||
): ConversationChangedActionType {
|
): ThunkAction<void, RootStateType, unknown, ConversationChangedActionType> {
|
||||||
return {
|
return dispatch => {
|
||||||
type: 'CONVERSATION_CHANGED',
|
calling.groupMembersChanged(id);
|
||||||
payload: {
|
|
||||||
id,
|
dispatch({
|
||||||
data,
|
type: 'CONVERSATION_CHANGED',
|
||||||
},
|
payload: {
|
||||||
|
id,
|
||||||
|
data,
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function conversationRemoved(id: string): ConversationRemovedActionType {
|
function conversationRemoved(id: string): ConversationRemovedActionType {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue