From 7e7cb57ee770a54e041b31d747ef4ef472ebd10a Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Mon, 26 Aug 2024 08:54:15 -0600 Subject: [PATCH] bridgev2/commands: fix NPE on search Signed-off-by: Sumner Evans --- bridgev2/commands/startchat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridgev2/commands/startchat.go b/bridgev2/commands/startchat.go index 24c8a488..c18e977a 100644 --- a/bridgev2/commands/startchat.go +++ b/bridgev2/commands/startchat.go @@ -181,7 +181,7 @@ func fnSearch(ce *Event) { ce.Log.Err(err).Object("portal_key", res.Chat.PortalKey).Msg("Failed to get DM portal") } } - if res.Chat.Portal != nil { + if res.Chat.Portal != nil && res.Chat.Portal.MXID != "" { portalName := res.Chat.Portal.Name if portalName == "" { portalName = res.Chat.Portal.MXID.String()