From 1d2502dcbbcbd7e10eb4746828f986c0e971855e Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 3 Oct 2023 16:01:07 +0100 Subject: [PATCH] Only fail the test if the Sender is different --- client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index f624aa6f..5562057e 100644 --- a/client/client.go +++ b/client/client.go @@ -249,7 +249,7 @@ func (c *CSAPI) Unsafe_SendEventUnsyncedWithTxnID(t TestLike, roomID string, e b if e.StateKey != nil { paths = []string{"_matrix", "client", "v3", "rooms", roomID, "state", e.Type, *e.StateKey} } - if e.Sender != "" { + if e.Sender != "" && e.Sender != c.UserID { t.Fatalf("Event.Sender must not be set, as this is set by the client in use (%s)", c.UserID) } res := c.MustDo(t, "PUT", paths, WithJSONBody(t, e.Content))