mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Merge pull request #6371 from matrix-org/travis/widgets/fix-enc
Send clear events to widgets when permitted
This commit is contained in:
commit
5a51b7139c
@ -51,7 +51,7 @@ import ThemeWatcher from "../../settings/watchers/ThemeWatcher";
|
|||||||
import { getCustomTheme } from "../../theme";
|
import { getCustomTheme } from "../../theme";
|
||||||
import CountlyAnalytics from "../../CountlyAnalytics";
|
import CountlyAnalytics from "../../CountlyAnalytics";
|
||||||
import { ElementWidgetCapabilities } from "./ElementWidgetCapabilities";
|
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 { ELEMENT_CLIENT_ID } from "../../identifiers";
|
||||||
import { getUserLanguage } from "../../languageHandler";
|
import { getUserLanguage } from "../../languageHandler";
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ export class StopGapWidget extends EventEmitter {
|
|||||||
private feedEvent(ev: MatrixEvent) {
|
private feedEvent(ev: MatrixEvent) {
|
||||||
if (!this.messaging) return;
|
if (!this.messaging) return;
|
||||||
|
|
||||||
const raw = ev.event as IEvent;
|
const raw = ev.getEffectiveEvent();
|
||||||
this.messaging.feedEvent(raw).catch(e => {
|
this.messaging.feedEvent(raw).catch(e => {
|
||||||
console.error("Error sending event to widget: ", e);
|
console.error("Error sending event to widget: ", e);
|
||||||
});
|
});
|
||||||
|
@ -164,7 +164,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
|
|||||||
results.push(ev);
|
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[]> {
|
public async readStateEvents(eventType: string, stateKey: string | undefined, limit: number): Promise<object[]> {
|
||||||
|
Loading…
Reference in New Issue
Block a user