This commit is contained in:
shoopea 2019-11-05 10:40:54 +08:00
parent 2cbe5e7aa3
commit 8eadfe3353

3
td.go
View File

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