From 38138e68de386fc60afdf507425052648b36f5be Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Fri, 9 Feb 2024 08:30:48 +0100 Subject: [PATCH] Avoid NPE --- clientapi/clientapi_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clientapi/clientapi_test.go b/clientapi/clientapi_test.go index 13f2086ec..29ff58665 100644 --- a/clientapi/clientapi_test.go +++ b/clientapi/clientapi_test.go @@ -2333,6 +2333,10 @@ func TestCreateRoomInvite(t *testing.T) { t.Fatal(err) } + if ev == nil { + t.Fatal("Membership event for Bob does not exist") + } + // Validate that there is NO displayname in content if gjson.GetBytes(ev.Content(), "displayname").Exists() { t.Fatal("Found displayname in invite")