Treat muted until -1 as muted forever

This commit is contained in:
Tulir Asokan 2021-05-04 19:53:43 +03:00
parent 29254ee29a
commit 947f3466b7

View file

@ -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 {