test
This commit is contained in:
parent
131941eb23
commit
2bbeab7e80
1
bot.go
1
bot.go
@ -278,6 +278,7 @@ func botMsgLoad(m *tb.Message) {
|
||||
resp, err := http.Get(m.Payload)
|
||||
logOnError(err, "botMsgLoad : Get")
|
||||
defer resp.Body.Close()
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
buf.ReadFrom(resp.Body)
|
||||
err = UnzipMessages(buf.Bytes())
|
||||
|
11
obj.go
11
obj.go
@ -110,6 +110,17 @@ func addObjMsg(msgID64 int64, msgChatID64 int64, msgUserID64 int64, msgSenderUse
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
m := new(ChatWarsMessage)
|
||||
m.ObjID64 = objId
|
||||
m.UserID64 = msgUserID64
|
||||
m.SenderUserID64 = msgSenderUserID64
|
||||
m.Date = msgDate
|
||||
m.ID64 = msgID64
|
||||
m.ChatID64 = msgChatID64
|
||||
m.Text = msgText
|
||||
cacheObjMsg.Store(objId, *m)
|
||||
|
||||
return objId, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user