forked from MirrorHub/mautrix-whatsapp
Fix small mistakes
This commit is contained in:
parent
e997df8c49
commit
0d6af45dcf
2 changed files with 5 additions and 4 deletions
5
user.go
5
user.go
|
@ -500,10 +500,10 @@ func (user *User) updateChatMute(intent *appservice.IntentAPI, portal *Portal, m
|
|||
}
|
||||
var err error
|
||||
if mutedUntil.IsZero() && mutedUntil.Before(time.Now()) {
|
||||
user.log.Debugfln("Portal %s is muted until %d, unmuting...", portal.MXID, mutedUntil)
|
||||
user.log.Debugfln("Portal %s is muted until %s, unmuting...", portal.MXID, mutedUntil)
|
||||
err = intent.DeletePushRule("global", pushrules.RoomRule, string(portal.MXID))
|
||||
} else {
|
||||
user.log.Debugfln("Portal %s is muted until %d, muting...", portal.MXID, mutedUntil)
|
||||
user.log.Debugfln("Portal %s is muted until %s, muting...", portal.MXID, mutedUntil)
|
||||
err = intent.PutPushRule("global", pushrules.RoomRule, string(portal.MXID), &mautrix.ReqPutPushRule{
|
||||
Actions: []pushrules.PushActionType{pushrules.ActionDontNotify},
|
||||
})
|
||||
|
@ -576,6 +576,7 @@ func (user *User) syncChatDoublePuppetDetails(portal *Portal, justCreated bool)
|
|||
if justCreated && user.bridge.Config.Bridge.MuteStatusBroadcast {
|
||||
user.updateChatMute(intent, portal, time.Now().Add(365*24*time.Hour))
|
||||
user.updateChatTag(intent, portal, user.bridge.Config.Bridge.ArchiveTag, true)
|
||||
return
|
||||
} else if !chat.Found {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue