We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
m.read
1 parent 60d784b commit 5098f57Copy full SHA for 5098f57
1 file changed
tests/csapi/apidoc_room_receipts_test.go
@@ -64,10 +64,16 @@ func TestRoomReceipts(t *testing.T) {
64
t,
65
client.SyncReq{Since: sinceToken},
66
client.SyncEphemeralHas(roomID, func(r gjson.Result) bool {
67
- if r.Get("type").Str != "m.read" {
+ // Check that this is a m.receipt ephemeral event.
68
+ if r.Get("type").Str != "m.receipt" {
69
return false
70
}
71
72
+ // Check that the receipt type is "m.read".
73
+ if !r.Get(`content.*.m\.read`).Exists() {
74
+ t.Fatalf("Receipt was not of type 'm.read'")
75
+ }
76
+
77
// Ensure that the `room_id` field does NOT exist.
78
if r.Get("room_id").Exists() {
79
t.Fatalf("Read receipt included `room_id` field down sync: %s", r.Raw)
0 commit comments