Browse Source

Ignore delete chat updates if the room doesn't exist

Tulir Asokan 2 years ago
parent
commit
7c9746f5de
1 changed files with 3 additions and 0 deletions
  1. 3 0
      portal.go

+ 3 - 0
portal.go

@@ -2615,6 +2615,9 @@ func (portal *Portal) HandleWhatsAppInvite(source *User, senderJID *types.JID, j
 }
 
 func (portal *Portal) HandleWhatsAppDeleteChat(user *User) {
+	if portal.MXID == "" {
+		return
+	}
 	matrixUsers, err := portal.GetMatrixUsers()
 	if err != nil {
 		portal.log.Errorln("Failed to get Matrix users to see if DeleteChat should be handled:", err)