From a16b7d62232be156b5fae9114e5a59364b5d6e59 Mon Sep 17 00:00:00 2001 From: vabd Date: Thu, 25 Oct 2018 17:25:56 +0100 Subject: [PATCH] Move attribution higher so the check can work on two payload received around the same time --- src/matrix/matrix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/matrix.go b/src/matrix/matrix.go index c078ce6..873eb93 100644 --- a/src/matrix/matrix.go +++ b/src/matrix/matrix.go @@ -136,6 +136,8 @@ func (c *Cli) sendNotice(data types.SCSData) (err error) { return } + c.prevMsgs[data.Number] = data.Message + // Load the template defined in the configuration file. The "message" name // used here is not important. tmpl, err := template.New("message").Parse(c.cfg.Notices.Pattern) @@ -164,8 +166,6 @@ func (c *Cli) sendNotice(data types.SCSData) (err error) { } } - c.prevMsgs[data.Number] = data.Message - logEntry.Debug("Notice sent") return