Make sure own messages don't cause notifications

This commit is contained in:
Tulir Asokan 2020-04-16 19:47:09 +03:00
parent bc80ff3a56
commit ae770a97e2

View File

@ -543,7 +543,7 @@ func (c *Container) HandleMessage(source EventSource, mxEvent *event.Event) {
message := roomView.AddEvent(evt) message := roomView.AddEvent(evt)
if message != nil { if message != nil {
roomView.MxRoom().LastReceivedMessage = message.Time() roomView.MxRoom().LastReceivedMessage = message.Time()
if c.syncer.FirstSyncDone { if c.syncer.FirstSyncDone && evt.Sender != c.config.UserID {
pushRules := c.PushRules().GetActions(roomView.MxRoom(), evt.Event).Should() pushRules := c.PushRules().GetActions(roomView.MxRoom(), evt.Event).Should()
mainView.NotifyMessage(roomView.MxRoom(), message, pushRules) mainView.NotifyMessage(roomView.MxRoom(), message, pushRules)
c.ui.Render() c.ui.Render()