浏览代码

Ignore delete chat updates if the room doesn't exist

Tulir Asokan 2 年之前
父节点
当前提交
7c9746f5de
共有 1 个文件被更改,包括 3 次插入0 次删除
  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)