Skip to content

Commit fa78686

Browse files
committed
more verbal comment
1 parent de97f9e commit fa78686

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ClientWidgetApi.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,13 @@ export class ClientWidgetApi extends EventEmitter {
537537
// For backwards compatibility we still call the deprecated
538538
// readRoomEvents and readStateEvents methods in case the client isn't
539539
// letting us know the currently viewed room via setViewedRoomId
540+
//
541+
// This can be considered as a deprecated implementation.
542+
// A driver should call `setViewedRoomId` on the widget messaging and implement the new readRoomState and readRoomTimeline
543+
// Methods.
544+
// This block makes sure that it is also possible to not use setViewedRoomId.
545+
// readRoomTimeline and readRoomState are required however! Otherwise widget requests that include
546+
// `room_ids` will fail.
540547
console.warn(
541548
"The widgetDriver uses deprecated behaviour:\n It does not set the viewedRoomId using `setViewedRoomId`",
542549
);

0 commit comments

Comments
 (0)