Fix state events being hidden from widgets in read_events actions (#29954)
This widget driver method was mistakenly filtering all state events out of the responses to read_events fromWidget actions. This was a hold-over from back when read_events had two different behaviors depending on whether you specified a state_key (i.e. before the introduction of the update_state action).
This commit is contained in:
@@ -708,6 +708,7 @@ describe("StopGapWidgetDriver", () => {
|
||||
id: "$event-id2",
|
||||
type: "org.example.foo",
|
||||
user: "@alice:example.org",
|
||||
skey: "",
|
||||
content: { hello: "world" },
|
||||
room: "!1:example.org",
|
||||
});
|
||||
@@ -726,6 +727,12 @@ describe("StopGapWidgetDriver", () => {
|
||||
).toEqual([event2, event1].map((e) => e.getEffectiveEvent()));
|
||||
});
|
||||
|
||||
it("reads state events", async () => {
|
||||
expect(
|
||||
await driver.readRoomTimeline("!1:example.org", "org.example.foo", undefined, "", 10, undefined),
|
||||
).toEqual([event2.getEffectiveEvent()]);
|
||||
});
|
||||
|
||||
it("reads up to a limit", async () => {
|
||||
expect(
|
||||
await driver.readRoomTimeline("!1:example.org", "org.example.foo", undefined, undefined, 1, undefined),
|
||||
|
||||
Reference in New Issue
Block a user