test callbacks

This commit is contained in:
shoopea 2020-02-05 10:38:44 +08:00
parent 14c4657c6c
commit 585cb289a9
2 changed files with 2 additions and 2 deletions

2
obj.go
View File

@ -337,7 +337,7 @@ func addObjMsg(m ChatWarsMessage) (int64, error) {
}
cacheObjMsg.Store(objId, *m)
cacheObjMsg.Store(objId, *msg)
return objId, nil
}

View File

@ -318,7 +318,7 @@ func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage, objIds chan<- int64) {
log.Printf("SQLCWMsgWorker[%d] (%d) : Callback : %s : %s\n", id, m.ID64, c.Name, string(c.Data))
}
}
objId, err := addObjMsg(m.ID64, m.ChatID64, m.TGUserID64, m.TGSenderUserID64, m.Date, m.Text)
objId, err := addObjMsg(m)
logOnError(err, "SQLCWMsgWorker["+strconv.Itoa(id)+"] : Inserting message.")
if err == nil && objId != 0 {
// log.Printf("SQLCWMsgWorker["+strconv.Itoa(id)+"] : Message inserted (%d).\n", objId)