Skip to content

Commit 787b2fc

Browse files
fix: MSC4311 requires the create event to be present in stripped state,
but extra fields shouldn't be there
1 parent a17f21b commit 787b2fc

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

tests/v12_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,15 +1357,12 @@ func TestMSC4311FullCreateEventOnStrippedState(t *testing.T) {
13571357
fmt.Sprintf("rooms.invite.%s.invite_state.events", client.GjsonEscape(roomID)),
13581358
)
13591359
must.NotEqual(t, len(inviteState.Array()), 0, "no events in invite_state")
1360-
// find the create event
1360+
// find the create event: MSC4311 requires it to be present, but clients
1361+
// still receive it in stripped state format (no extra fields)
13611362
found := false
13621363
for _, ev := range inviteState.Array() {
13631364
if ev.Get("type").Str == spec.MRoomCreate {
13641365
found = true
1365-
// we should have extra fields
1366-
must.MatchGJSON(t, ev,
1367-
match.JSONKeyPresent("origin_server_ts"),
1368-
)
13691366
}
13701367
}
13711368
if !found {

0 commit comments

Comments
 (0)