Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
989077d
init
M-ZubairAhmed Jun 23, 2026
079e4cc
This refactor improves code organization and prepares the codebase fo…
M-ZubairAhmed Jun 23, 2026
62da486
Refactor active call registration to use action creator. Updated acti…
M-ZubairAhmed Jun 23, 2026
a73e6e4
Reorganize imports in utils.test.ts to improve code clarity. Moved `g…
M-ZubairAhmed Jun 23, 2026
ba01a45
Refactor call session handling and availability management. Updated i…
M-ZubairAhmed Jun 24, 2026
04ca0a0
revert sip thing
M-ZubairAhmed Jun 24, 2026
fe30283
rev
M-ZubairAhmed Jun 24, 2026
f142891
rev3
M-ZubairAhmed Jun 24, 2026
a407ec2
Refactor active call management and channel availability handling. Up…
M-ZubairAhmed Jun 24, 2026
e611ced
Remove admin check from ChannelHeaderMenuItem component. The componen…
M-ZubairAhmed Jun 24, 2026
3e8ae3b
Update action types and exports for call management. Ensure consisten…
M-ZubairAhmed Jun 24, 2026
d42a892
Implement host management in call functionality. Introduced new actio…
M-ZubairAhmed Jun 25, 2026
d97d321
Remove unused import from utils.ts to streamline code and improve cla…
M-ZubairAhmed Jun 25, 2026
ed0fa22
Refactor host management actions and selectors for improved clarity a…
M-ZubairAhmed Jun 25, 2026
0703d81
Update call component props to use ActiveCall type for callID. Refact…
M-ZubairAhmed Jun 25, 2026
51b15c9
Refactor Jest configuration to use new i18n mock file and remove outd…
M-ZubairAhmed Jun 25, 2026
fa449dc
Refactor call management by replacing deprecated `getCallActive` with…
M-ZubairAhmed Jun 29, 2026
90a8d44
Merge branch 'v2' of github.com:mattermost/mattermost-plugin-calls in…
M-ZubairAhmed Jun 29, 2026
4546346
Fix phone-call SIP tests: set botID so isPhoneCallChannel resolves
M-ZubairAhmed Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build/sync/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ actions:
- webapp/tsconfig.json
- webapp/webpack.config.js
- webapp/src/manifest.test.tsx
- webapp/tests/setup.tsx
actions:
- type: overwrite_file
params:
Expand Down
2 changes: 2 additions & 0 deletions server/api_livekit_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ func TestHandleLiveKitSIPParticipant(t *testing.T) {
defer ResetTestStore(t, p.store)

botID := model.NewId()
p.botID = botID
p.botSession = &model.Session{UserId: botID}

channelID := model.NewId()
Expand Down Expand Up @@ -462,6 +463,7 @@ func TestHandleLiveKitSIPParticipant(t *testing.T) {
defer ResetTestStore(t, p.store)

botID := model.NewId()
p.botID = botID
p.botSession = &model.Session{UserId: botID}

channelID := model.NewId()
Expand Down
1 change: 1 addition & 0 deletions server/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func TestRemoveUserSessionPhoneCall(t *testing.T) {
callsClusterLocks: map[string]*cluster.Mutex{},
metrics: mockMetrics,
configuration: &configuration{}, // no LiveKitURL: livekitDeleteRoom is a no-op
botID: botID,
botSession: &model.Session{UserId: botID},
sessions: map[string]*session{},
}
Expand Down
9 changes: 5 additions & 4 deletions standalone/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {getTheme, Theme} from 'mattermost-redux/selectors/entities/preferences';
import configureStore from 'mattermost-redux/store';
import {getCallActive, getCallsConfig, getCallsVersionInfo, joinUser, leaveUser, localSessionClose, setClientConnecting} from 'plugin/actions';
import {getCallsConfig, getCallsVersionInfo, joinUser, leaveUser, localSessionClose, setClientConnecting} from 'plugin/actions';
import CallClient, {CALL_EVENT, ConnectPayload, DisconnectReason} from 'plugin/clients/call';
import RestClient from 'plugin/clients/rest';
import {
Expand All @@ -44,7 +44,8 @@ import {
} from 'plugin/log';
import {pluginId} from 'plugin/manifest';
import reducer from 'plugin/reducers';
import {userLoweredHand, userMuted, userRaisedHand, usersVoiceActivityChanged, userUnmuted} from 'plugin/state/session/actions';
import {fetchIsCallActiveInChannel} from 'plugin/state/active_calls/actions';
import {userLoweredHand, userMuted, userRaisedHand, usersVoiceActivityChanged, userUnmuted} from 'plugin/state/sessions/actions';
import {Store} from 'plugin/types/mattermost-webapp';
import {
getWSConnectionURL,
Expand Down Expand Up @@ -282,10 +283,10 @@ export default async function initialiseEmbedApp(cfg: InitConfig) {

let active = false;
try {
[, active] = await Promise.all([
[, , active] = await Promise.all([
store.dispatch(getCallsConfig()),
store.dispatch(getCallsVersionInfo()),
getCallActive(channelID),
fetchIsCallActiveInChannel(channelID),
]);
} catch (e) {
throw new Error(`failed to fetch channel data: ${e}`);
Expand Down
4 changes: 2 additions & 2 deletions standalone/src/recording/components/recording_view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {ReactionStream} from 'src/components/reaction_stream/reaction_stream';
import Timestamp from 'src/components/timestamp';
import {callProfileImages} from 'src/recording/selectors';
import {
hostIDForCurrentCall,
profilesInCurrentCallMap,
screenSharingSessionForCurrentCall,
sessionsInCurrentCall,
} from 'src/selectors';
import {getHostIDForCurrentChannel} from 'src/state/hosts/selectors';

const RecordingView = () => {
const {formatMessage} = useIntl();
Expand All @@ -35,7 +35,7 @@ const RecordingView = () => {
.sort(stateSortSessions(screenSharingSession?.session_id || '', true)));
const profileImages = useSelector((state: GlobalState) => callProfileImages(state, callsClient?.channelID || ''));

const hostID = useSelector((state: GlobalState) => hostIDForCurrentCall(state));
const hostID = useSelector(getHostIDForCurrentChannel);

const attachVoiceTracks = (tracks: MediaStreamTrack[]) => {
for (const track of tracks) {
Expand Down
4 changes: 2 additions & 2 deletions standalone/src/recording/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {Store} from 'plugin/types/mattermost-webapp';
import {
getPluginPath,
getTranslations,
getUserIDsForSessions,
runWithRetry,
setCallsGlobalCSSVars,
} from 'plugin/utils';
Expand All @@ -22,6 +21,7 @@ import {Provider} from 'react-redux';
import RestClient from 'src/clients/rest';
import {getJobID} from 'src/common';
import recordingReducer from 'src/recording/reducers';
import {getUserIDsFromSessions} from 'src/state/sessions/selectors';

import initialiseEmbedApp, {InitCbProps} from '../index';
import {
Expand Down Expand Up @@ -125,7 +125,7 @@ function wsHandlerRecording(store: Store, ev: WebSocketMessage<WebsocketEventDat

if (call.sessions?.length > 0) {
runWithRetry(() => {
return fetchProfileImages(getUserIDsForSessions(call.sessions));
return fetchProfileImages(getUserIDsFromSessions(call.sessions));
}).then((images) => {
store.dispatch({
type: RECEIVED_CALL_PROFILE_IMAGES,
Expand Down
2 changes: 1 addition & 1 deletion webapp/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const config = {
moduleNameMapper: {
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'identity-obj-proxy',
'^.+\\.(css|less|scss)$': 'identity-obj-proxy',
'^.*i18n.*\\.(json)$': '<rootDir>/tests/i18n_mock.json',
'^.*i18n.*\\.(json)$': '<rootDir>/src/i18n.mock.json',
'^bundle-loader\\?lazy\\!(.*)$': '$1',
'^@mattermost/types/(.*)$': '<rootDir>/mattermost-webapp/webapp/platform/types/src/$1',
'^@mattermost/client$': '<rootDir>/mattermost-webapp/webapp/platform/client/src/index',
Expand Down
3 changes: 0 additions & 3 deletions webapp/src/action_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import {pluginId} from './manifest';

export const CALL_STATE = pluginId + '_call_state';
export const CALL_HOST = pluginId + '_call_host';
export const CALL_RECORDING_STATE = pluginId + '_call_recording_state';
export const CALL_LIVE_CAPTIONS_STATE = pluginId + '_call_live_captions_state';
export const CALL_REC_PROMPT_DISMISSED = pluginId + '_call_rec_prompt_dismissed';
Expand Down Expand Up @@ -35,7 +33,6 @@ export const TRANSCRIPTIONS_ENABLED = pluginId + '_transcriptions_enabled';
export const LIVE_CAPTIONS_ENABLED = pluginId + '_live_captions_enabled';
export const RTCD_ENABLED = pluginId + '_rtcd_enabled';
export const TRANSCRIBE_API = pluginId + '_transcribe_api';
export const RECEIVED_CHANNEL_STATE = pluginId + 'received_channel_state';
export const RECEIVED_CALLS_USER_PREFERENCES = pluginId + '_received_calls_user_preferences';

export const DESKTOP_WIDGET_CONNECTED = pluginId + '_desktop_widget_connected';
Expand Down
Loading
Loading