fix: adapt SmallWidget to matrix-widget-api 1.17.0 API

This commit is contained in:
hazre
2026-02-19 23:09:37 +01:00
parent 30303fe4c2
commit a4c34eff8a
2 changed files with 23 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ export class SmallWidget extends EventEmitter {
);
this.iframe = iframe;
this.messaging = new ClientWidgetApi(this.mockWidget, iframe, driver);
this.messaging.setViewedRoomId(this.roomId ?? null);
// Emit events during the widget lifecycle
this.messaging.on('preparing', () => this.emit('preparing'));
@@ -317,7 +318,7 @@ export class SmallWidget extends EventEmitter {
this.eventsToFeed.add(ev);
} else {
const raw = ev.getEffectiveEvent();
this.messaging.feedEvent(raw as IRoomEvent, this.roomId ?? '').catch(() => null);
this.messaging.feedEvent(raw as IRoomEvent).catch(() => null);
}
}
}