Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 0ff567d

Browse files
committed
Only return the approved widget capabilities instead of accepting all requested capabilities
1 parent 03f5a3c commit 0ff567d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/stores/widgets/StopGapWidgetDriver.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { IContent, IEvent, MatrixEvent } from "matrix-js-sdk/src/models/event";
3434
import { Room } from "matrix-js-sdk/src/models/room";
3535
import { logger } from "matrix-js-sdk/src/logger";
3636

37-
import { iterableDiff, iterableUnion } from "../../utils/iterables";
37+
import { iterableDiff } from "../../utils/iterables";
3838
import { MatrixClientPeg } from "../../MatrixClientPeg";
3939
import ActiveRoomObserver from "../../ActiveRoomObserver";
4040
import Modal from "../../Modal";
@@ -131,13 +131,11 @@ export class StopGapWidgetDriver extends WidgetDriver {
131131
}
132132
}
133133

134-
const allAllowed = new Set(iterableUnion(allowedSoFar, requested));
135-
136134
if (rememberApproved) {
137-
setRememberedCapabilitiesForWidget(this.forWidget, Array.from(allAllowed));
135+
setRememberedCapabilitiesForWidget(this.forWidget, Array.from(allowedSoFar));
138136
}
139137

140-
return allAllowed;
138+
return allowedSoFar;
141139
}
142140

143141
public async sendEvent(

0 commit comments

Comments
 (0)