Grant Element Call widget capabilities for "raise hand" feature (#82)
* Grant Element Call widget caps for "raise hand" This allows the widget to send and receive event types used by the "raise hand" feature (element-hq/element-call#2542) without prompting the user to grant the capabilities to do so. * Lintpull/28192/head
parent
47a9377d63
commit
ef1d4f6c12
|
@ -175,7 +175,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
|
||||||
WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomCreate).raw,
|
WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomCreate).raw,
|
||||||
);
|
);
|
||||||
|
|
||||||
const sendRecvRoomEvents = ["io.element.call.encryption_keys"];
|
const sendRecvRoomEvents = ["io.element.call.encryption_keys", EventType.Reaction, EventType.RoomRedaction];
|
||||||
for (const eventType of sendRecvRoomEvents) {
|
for (const eventType of sendRecvRoomEvents) {
|
||||||
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Send, eventType).raw);
|
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Send, eventType).raw);
|
||||||
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Receive, eventType).raw);
|
this.allowedCapabilities.add(WidgetEventCapability.forRoomEvent(EventDirection.Receive, eventType).raw);
|
||||||
|
|
|
@ -94,6 +94,10 @@ describe("StopGapWidgetDriver", () => {
|
||||||
"org.matrix.msc2762.timeline:!1:example.org",
|
"org.matrix.msc2762.timeline:!1:example.org",
|
||||||
"org.matrix.msc2762.send.event:org.matrix.rageshake_request",
|
"org.matrix.msc2762.send.event:org.matrix.rageshake_request",
|
||||||
"org.matrix.msc2762.receive.event:org.matrix.rageshake_request",
|
"org.matrix.msc2762.receive.event:org.matrix.rageshake_request",
|
||||||
|
"org.matrix.msc2762.send.event:m.reaction",
|
||||||
|
"org.matrix.msc2762.receive.event:m.reaction",
|
||||||
|
"org.matrix.msc2762.send.event:m.room.redaction",
|
||||||
|
"org.matrix.msc2762.receive.event:m.room.redaction",
|
||||||
"org.matrix.msc2762.receive.state_event:m.room.create",
|
"org.matrix.msc2762.receive.state_event:m.room.create",
|
||||||
"org.matrix.msc2762.receive.state_event:m.room.member",
|
"org.matrix.msc2762.receive.state_event:m.room.member",
|
||||||
"org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call",
|
"org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call",
|
||||||
|
|
Loading…
Reference in New Issue