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

Commit

Permalink
Merge pull request #6371 from matrix-org/travis/widgets/fix-enc
Browse files Browse the repository at this point in the history
Send clear events to widgets when permitted
  • Loading branch information
turt2live authored Jul 14, 2021
2 parents 603889d + c4b0306 commit 5a51b71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/stores/widgets/StopGapWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import ThemeWatcher from "../../settings/watchers/ThemeWatcher";
import { getCustomTheme } from "../../theme";
import CountlyAnalytics from "../../CountlyAnalytics";
import { ElementWidgetCapabilities } from "./ElementWidgetCapabilities";
import { MatrixEvent, IEvent } from "matrix-js-sdk/src/models/event";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { ELEMENT_CLIENT_ID } from "../../identifiers";
import { getUserLanguage } from "../../languageHandler";

Expand Down Expand Up @@ -415,7 +415,7 @@ export class StopGapWidget extends EventEmitter {
private feedEvent(ev: MatrixEvent) {
if (!this.messaging) return;

const raw = ev.event as IEvent;
const raw = ev.getEffectiveEvent();
this.messaging.feedEvent(raw).catch(e => {
console.error("Error sending event to widget: ", e);
});
Expand Down
2 changes: 1 addition & 1 deletion src/stores/widgets/StopGapWidgetDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
results.push(ev);
}

return results.map(e => e.event);
return results.map(e => e.getEffectiveEvent());
}

public async readStateEvents(eventType: string, stateKey: string | undefined, limit: number): Promise<object[]> {
Expand Down

0 comments on commit 5a51b71

Please sign in to comment.