diff --git a/apps/meteor/server/modules/listeners/listeners.module.ts b/apps/meteor/server/modules/listeners/listeners.module.ts index a1898592c5a..45d8e75952f 100644 --- a/apps/meteor/server/modules/listeners/listeners.module.ts +++ b/apps/meteor/server/modules/listeners/listeners.module.ts @@ -132,6 +132,13 @@ export class ListenersModule { }, ); + service.onEvent('room.video-conference', ({ rid, callId }) => { + /* deprecated */ + (notifications.notifyRoom as any)(rid, callId); + + notifications.notifyRoom(rid, 'videoconf', callId); + }); + service.onEvent('presence.status', ({ user }) => { const { _id, username, name, status, statusText, roles } = user; if (!status || !username) { diff --git a/apps/meteor/server/services/video-conference/service.ts b/apps/meteor/server/services/video-conference/service.ts index ed44cee96e5..2543e91a3e4 100644 --- a/apps/meteor/server/services/video-conference/service.ts +++ b/apps/meteor/server/services/video-conference/service.ts @@ -41,7 +41,6 @@ import { updateCounter } from '../../../app/statistics/server/functions/updateSt import { readSecondaryPreferred } from '../../database/readSecondaryPreferred'; import { availabilityErrors } from '../../../lib/videoConference/constants'; import { callbacks } from '../../../lib/callbacks'; -import { Notifications } from '../../../app/notifications/server'; import { canAccessRoomIdAsync } from '../../../app/authorization/server/functions/canAccessRoom'; import { i18n } from '../../lib/i18n'; @@ -419,10 +418,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } private notifyVideoConfUpdate(rid: IRoom['_id'], callId: VideoConference['_id']): void { - /* deprecated */ - (Notifications.notifyRoom as any)(rid, callId); - - Notifications.notifyRoom(rid, 'videoconf', callId); + void api.broadcast('room.video-conference', { rid, callId }); } private async endCall(callId: VideoConference['_id']): Promise { diff --git a/packages/core-services/src/Events.ts b/packages/core-services/src/Events.ts index ed04a2404ec..56187608df0 100644 --- a/packages/core-services/src/Events.ts +++ b/packages/core-services/src/Events.ts @@ -36,6 +36,7 @@ import type { AutoUpdateRecord } from './types/IMeteor'; type ClientAction = 'inserted' | 'updated' | 'removed' | 'changed'; export type EventSignatures = { + 'room.video-conference': (params: { rid: string; callId: string }) => void; 'shutdown': (params: Record) => void; '$services.changed': (info: { localService: boolean }) => void; 'accounts.login': (info: { userId: string; connection: ISocketConnection }) => void;