summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-12-06 17:49:35 +0100
committerGitHub <noreply@github.com>2020-12-06 17:49:35 +0100
commit92da8c7044e0e07ec988a79d9d992437e0cadda3 (patch)
tree8e878cc6079afc5d60e0aa18ee7fe918decac0e4
parent9dba3d538588746536c29863baa5837557402a39 (diff)
downloadmatterbridge-msglm-92da8c7044e0e07ec988a79d9d992437e0cadda3.tar.gz
matterbridge-msglm-92da8c7044e0e07ec988a79d9d992437e0cadda3.tar.bz2
matterbridge-msglm-92da8c7044e0e07ec988a79d9d992437e0cadda3.zip
Mark messages as read (matrix). Fixes #1317 (#1328)
-rw-r--r--bridge/matrix/matrix.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go
index acb20261..69d0264b 100644
--- a/bridge/matrix/matrix.go
+++ b/bridge/matrix/matrix.go
@@ -399,6 +399,11 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) {
b.Log.Debugf("<= Sending message from %s on %s to gateway", ev.Sender, b.Account)
b.Remote <- rmsg
+
+ // not crucial, so no ratelimit check here
+ if err := b.mc.MarkRead(ev.RoomID, ev.ID); err != nil {
+ b.Log.Errorf("couldn't mark message as read %s", err.Error())
+ }
}
}