瀏覽代碼

Treat muted until -1 as muted forever

Tulir Asokan 4 年之前
父節點
當前提交
947f3466b7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      user.go

+ 1 - 1
user.go

@@ -690,7 +690,7 @@ func (user *User) updateChatMute(intent *appservice.IntentAPI, portal *Portal, m
 		intent = doublePuppet.CustomIntent()
 	}
 	var err error
-	if mutedUntil < time.Now().Unix() {
+	if mutedUntil != -1 && mutedUntil < time.Now().Unix() {
 		user.log.Debugfln("Portal %s is muted until %d, unmuting...", portal.MXID, mutedUntil)
 		err = intent.DeletePushRule("global", pushrules.RoomRule, string(portal.MXID))
 	} else {