From 8bd53cd3e934f0cf437a227f1b2dc712c025d612 Mon Sep 17 00:00:00 2001 From: David Florness Date: Sun, 15 May 2022 12:40:41 -0400 Subject: [PATCH] Clarify comment --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e7d04d2..480840c 100644 --- a/main.go +++ b/main.go @@ -128,7 +128,8 @@ func isBadEncryptError(err error) bool { // this function assumes evt.Type is EventMessage // return value is the message content to send back, if any func getMsgResponse(client *mautrix.Client, evt *event.Event) *event.MessageEventContent { - // only respond to messages that were sent in the last five minutes + // only respond to messages that were sent in the last five minutes so + // that during an initial sync we don't respond to old messages if time.Unix(evt.Timestamp / 1000, evt.Timestamp % 1000).Before(time.Now().Add(time.Minute * -5)) { return nil } -- 2.38.4