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()