testtest
This commit is contained in:
parent
eac8507dde
commit
da025e4012
6
obj.go
6
obj.go
@ -114,13 +114,13 @@ func addObjMsg(msgID64 int64, msgChatID64 int64, msgUserID64 int64, msgSenderUse
|
||||
}
|
||||
|
||||
func getObjMsg(objId int64) (*ChatWarsMessage, error) {
|
||||
var m *ChatWarsMessage
|
||||
|
||||
if v, ok := cacheObjMsg.Load(objId); ok {
|
||||
m := v.(ChatWarsMessage)
|
||||
return m, nil
|
||||
return *m, nil
|
||||
}
|
||||
|
||||
var m *ChatWarsMessage
|
||||
|
||||
stmt, err := db.Prepare(`SELECT om.msg_id, om.chat_id, om.user_id, om.sender_user_id, om.date, om.text FROM obj_msg om WHERE om.obj_id = ?`)
|
||||
if err != nil {
|
||||
return m, err
|
||||
|
Loading…
Reference in New Issue
Block a user