From 8eadfe3353f5632c756e62728ca37992ee37a160 Mon Sep 17 00:00:00 2001 From: shoopea Date: Tue, 5 Nov 2019 10:40:54 +0800 Subject: [PATCH] test --- td.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td.go b/td.go index 86ef6c3..f5fe75e 100644 --- a/td.go +++ b/td.go @@ -75,7 +75,8 @@ func ListenTG(c *tdlib.Client) { lastChatMsgMux.RUnlock() lastChatMsgMux.Lock() if _, ok := lastChatTDMsg[m.ChatID64]; !ok { - lastChatTDMsg[m.ChatID64] = time.Now().Add(-1 * time.Second) + initTime := time.Now().Add(-1 * time.Second) + lastChatTDMsg[m.ChatID64] = initTime lastChatTDMsgMux[m.ChatID64] = new(sync.Mutex) } lastChatMsgMux.Unlock()