remove unneeded widget permissions

This commit is contained in:
Timo K
2026-02-04 19:49:20 +01:00
parent 15c39372f4
commit ca32d3a834
2 changed files with 15 additions and 39 deletions

View File

@@ -52,17 +52,17 @@ describe("widget", () => {
expect(widget).toBeDefined();
expect(configInitSpy).toHaveBeenCalled();
const sendEvent = [
EventType.CallNotify, // Sent as a deprecated fallback
EventType.RTCNotification,
"org.matrix.msc4075.call.notify", // Sent as a deprecated fallback
"org.matrix.msc4075.rtc.notification",
];
const sendRecvEvent = [
"org.matrix.rageshake_request",
EventType.CallEncryptionKeysPrefix,
EventType.Reaction,
EventType.RoomRedaction,
ElementCallReactionEventType,
EventType.RTCDecline,
EventType.RTCMembership,
"io.element.call.encryption_keys",
"m.reaction",
"m.room.redaction",
"io.element.call.reaction",
"org.matrix.msc4310.rtc.decline",
"org.matrix.msc4143.rtc.member",
];
const sendState = [
@@ -74,26 +74,14 @@ describe("widget", () => {
stateKey,
}));
const receiveState = [
{ eventType: EventType.RoomCreate },
{ eventType: EventType.RoomName },
{ eventType: EventType.RoomMember },
{ eventType: EventType.RoomEncryption },
{ eventType: EventType.GroupCallMemberPrefix },
{ eventType: "m.room.create" },
{ eventType: "m.room.name" },
{ eventType: "m.room.member" },
{ eventType: "m.room.encryption" },
{ eventType: "org.matrix.msc3401.call.member" },
];
const sendRecvToDevice = [
EventType.CallInvite,
EventType.CallCandidates,
EventType.CallAnswer,
EventType.CallHangup,
EventType.CallReject,
EventType.CallSelectAnswer,
EventType.CallNegotiate,
EventType.CallSDPStreamMetadataChanged,
EventType.CallSDPStreamMetadataChangedPrefix,
EventType.CallReplaces,
EventType.CallEncryptionKeysPrefix,
];
const sendRecvToDevice = ["io.element.call.encryption_keys"];
expect(createRoomWidgetClientSpy.mock.calls[0][1]).toStrictEqual({
sendEvent: [...sendEvent, ...sendRecvEvent],

View File

@@ -142,19 +142,7 @@ export const initializeWidget = (): void => {
{ eventType: EventType.GroupCallMemberPrefix },
];
const sendRecvToDevice = [
EventType.CallInvite,
EventType.CallCandidates,
EventType.CallAnswer,
EventType.CallHangup,
EventType.CallReject,
EventType.CallSelectAnswer,
EventType.CallNegotiate,
EventType.CallSDPStreamMetadataChanged,
EventType.CallSDPStreamMetadataChangedPrefix,
EventType.CallReplaces,
EventType.CallEncryptionKeysPrefix,
];
const sendRecvToDevice = [EventType.CallEncryptionKeysPrefix];
const client = createRoomWidgetClient(
api,