Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93905c5bc1 | ||
|
|
3b0050e8bb | ||
|
|
41b45bef25 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lotusguild/element-call-embedded",
|
||||
"version": "0.25.0-lotus.21",
|
||||
"version": "0.25.0-lotus.22",
|
||||
"files": [
|
||||
"README.md",
|
||||
"LICENSE-AGPL-3.0",
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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 }
|
||||
: {}),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user