diff --git a/src/app/plugins/call/CallEmbed.ts b/src/app/plugins/call/CallEmbed.ts index 039b024b1..0ef609645 100644 --- a/src/app/plugins/call/CallEmbed.ts +++ b/src/app/plugins/call/CallEmbed.ts @@ -31,6 +31,7 @@ import { verifyDenoiseAssets } from './denoiseSmokeCheck'; import { canDelegateCapability } from './utils'; import { getCallPageUrl } from './callPageUrl'; import { restrictWidgetMessages } from '../widgetTransport'; +import { isRingableRoom } from '../../utils/callRing'; // Maximum time to wait for the embedded Element Call iframe to progress from // initial load to a ready/joined state. If it hasn't by then, we assume the @@ -251,8 +252,18 @@ export class CallEmbed { verifyDenoiseAssets(denoiseModel).catch(() => undefined); } + // [Gitea #295] Only ask Element Call to notify where a call can ring at all + // (DMs, invite-only groups outside a space). In a voice channel or space + // room the notification carries an @room mention, so every member got a + // highlighted ping (and phone push) whenever a moderator hopped in, and + // other clients showed it as a missed call. + // `none` needs element-call-embedded ≥ 0.25.0-lotus.23 (older builds ignore it). if (CallEmbed.startingCall(intent)) { - params.append('sendNotificationType', CallEmbed.dmCall(intent) ? 'ring' : 'notification'); + let notify = 'none'; + if (isRingableRoom(room, CallEmbed.dmCall(intent))) { + notify = CallEmbed.dmCall(intent) ? 'ring' : 'notification'; + } + params.append('sendNotificationType', notify); } // [Gitea #43] On its own origin when config.json sets elementCallUrl.