diff --git a/.changeset/fix-conference-call-ring.md b/.changeset/fix-conference-call-ring.md new file mode 100644 index 0000000000000..0523ac6cdad57 --- /dev/null +++ b/.changeset/fix-conference-call-ring.md @@ -0,0 +1,22 @@ +--- +'@rocket.chat/meteor': patch +--- + +fix(video-conference): ring notification for group calls and channels not shown + +Group video conference calls (channels and group DMs) sent a `ring` action to room members +but the client's VideoConfManager never handled it — no incoming call popup or ringtone +was shown to any member regardless of license tier. + +Additionally, accepting a group call ring incorrectly triggered the 1-1 direct-call +accept/confirm handshake, causing a 5-second timeout error for anyone who clicked Accept. + +Fixes: +- Add `ring` case in `VideoConfManager.onVideoConfNotification` delegating to new + `onGroupCallRing` method which marks the call with `isGroupCall: true` +- In `acceptIncomingCall`, group calls skip the accepted→confirmed signalling and + call `joinCall` directly +- Register a CE video conference type handler (priority 0) that enables `ringing: true` + for non-livechat rooms with ≤10 members, so CE installs also dispatch ring notifications + +Closes #34910 diff --git a/apps/meteor/client/lib/VideoConfManager.ts b/apps/meteor/client/lib/VideoConfManager.ts index 3fd883aa7e5d2..c65e3cacd4331 100644 --- a/apps/meteor/client/lib/VideoConfManager.ts +++ b/apps/meteor/client/lib/VideoConfManager.ts @@ -18,6 +18,7 @@ const ACCEPT_TIMEOUT = 5000; type IncomingDirectCall = DirectCallParams & { timeout: ReturnType | undefined; acceptTimeout?: ReturnType | undefined; + isGroupCall?: boolean; }; type CurrentCallParams = { @@ -184,6 +185,16 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter this.abortIncomingCall(callId), CALL_TIMEOUT); } - private startNewIncomingCall({ callId, uid, rid }: DirectCallParams): void { + private startNewIncomingCall({ callId, uid, rid }: DirectCallParams, isGroupCall = false): void { if (this.isCallDismissed(callId)) { this.debugLog(`[VideoConf] Ignoring dismissed call.`); return; @@ -593,6 +606,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter10 members) are +// also excluded here — no unintended ringing for large EE rooms. +const MAX_RINGING_MEMBERS = 10; + +videoConfTypes.registerVideoConferenceType( + { type: 'videoconference', ringing: true }, + async ({ _id, t }, allowRinging) => { + if (!allowRinging || t === 'l') { + return false; + } + + return (await Subscriptions.countByRoomId(_id)) <= MAX_RINGING_MEMBERS; + }, + 0, +);