From f81fd48592e5dc78893850b97bf98db457f73b96 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 24 Oct 2021 23:39:57 +0200 Subject: [PATCH] Do not check cache on deleted messages (mattermost). Fixes #1555 --- matterclient/messages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matterclient/messages.go b/matterclient/messages.go index ad66462cfb..81c3ecbe11 100644 --- a/matterclient/messages.go +++ b/matterclient/messages.go @@ -9,7 +9,7 @@ import ( func (m *MMClient) parseActionPost(rmsg *Message) { // add post to cache, if it already exists don't relay this again. // this should fix reposts - if ok, _ := m.lruCache.ContainsOrAdd(digestString(rmsg.Raw.Data["post"].(string)), true); ok { + if ok, _ := m.lruCache.ContainsOrAdd(digestString(rmsg.Raw.Data["post"].(string)), true); ok && rmsg.Raw.Event != model.WEBSOCKET_EVENT_POST_DELETED { m.logger.Debugf("message %#v in cache, not processing again", rmsg.Raw.Data["post"].(string)) rmsg.Text = "" return