Don't read NotifySpecified in push rules

This commit is contained in:
Tulir Asokan
2023-03-22 23:32:37 +02:00
parent 2751b186fa
commit 099006c9c3
2 changed files with 4 additions and 8 deletions

View File

@ -687,10 +687,9 @@ func (c *Container) HandleMessage(source mautrix.EventSource, mxEvent *event.Eve
if !room.Loaded() {
pushRules := c.PushRules().GetActions(room, evt.Event).Should()
shouldNotify := pushRules.Notify || !pushRules.NotifySpecified
if !shouldNotify {
if !pushRules.Notify {
room.LastReceivedMessage = time.Unix(evt.Timestamp/1000, evt.Timestamp%1000*1000)
room.AddUnread(evt.ID, shouldNotify, pushRules.Highlight)
room.AddUnread(evt.ID, pushRules.Notify, pushRules.Highlight)
mainView.Bump(room)
return
}