mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-15 01:43:49 +01:00
Treat muted until -1 as muted forever
This commit is contained in:
parent
29254ee29a
commit
947f3466b7
1 changed files with 1 additions and 1 deletions
2
user.go
2
user.go
|
@ -690,7 +690,7 @@ func (user *User) updateChatMute(intent *appservice.IntentAPI, portal *Portal, m
|
||||||
intent = doublePuppet.CustomIntent()
|
intent = doublePuppet.CustomIntent()
|
||||||
}
|
}
|
||||||
var err error
|
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)
|
user.log.Debugfln("Portal %s is muted until %d, unmuting...", portal.MXID, mutedUntil)
|
||||||
err = intent.DeletePushRule("global", pushrules.RoomRule, string(portal.MXID))
|
err = intent.DeletePushRule("global", pushrules.RoomRule, string(portal.MXID))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue