From 93905c5bc124078ce8a712d00c3851e553aa6fd8 Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Fri, 16 Oct 2026 22:06:12 -0400 Subject: [PATCH] feat(lotus): sendNotificationType=none turns the call-start notification off (cinny #295) The widget intent presets default sendNotificationType to "notification", and the URL param could only switch it to ring/notification, so the host had no way to say "don't notify". In persistent voice channels and space rooms that notification carries an @room mention: every member got a highlighted ping (and phone push) whenever a moderator joined first, and other clients showed it as a missed call. `sendNotificationType=none` now clears it after the presets are applied. Unit test added. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5 --- src/UrlParams.test.ts | 13 +++++++++++++ src/UrlParams.ts | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/src/UrlParams.test.ts b/src/UrlParams.test.ts index 47da4cbc..acbc4678 100644 --- a/src/UrlParams.test.ts +++ b/src/UrlParams.test.ts @@ -305,6 +305,19 @@ describe("UrlParams", () => { }); }); + it("[lotus] sendNotificationType=none turns the preset notification off", () => { + expect( + computeUrlParams( + "?intent=start_call&widgetId=1234&parentUrl=parent.org&sendNotificationType=none", + ).sendNotificationType, + ).toBeUndefined(); + expect( + computeUrlParams( + "?intent=start_call&widgetId=1234&parentUrl=parent.org", + ).sendNotificationType, + ).toBe("notification"); + }); + it("accepts join_existing", () => { expect( computeUrlParams( diff --git a/src/UrlParams.ts b/src/UrlParams.ts index cc8a53d1..d47e1299 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -523,6 +523,14 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => { ...properties, ...intentPreset, ...pickBy(configuration, (v?: unknown) => v !== undefined), + // [lotus] `sendNotificationType=none` turns the intent preset's + // notification off. The host passes it for persistent voice channels and + // space rooms, where a call start must not @room-ping every member + // (LotusGuild/cinny#295). pickBy above drops undefined, so it can't be + // expressed as a plain override. + ...(parser.getParam("sendNotificationType") === "none" + ? { sendNotificationType: undefined } + : {}), }; };