This commit is contained in:
shoopea 2019-05-03 19:36:50 +08:00
parent b33c915254
commit dca8cfbea9

6
td.go
View File

@ -62,15 +62,11 @@ func ListenCW(c *tdlib.Client) {
m := ChatWarsMessage{ m := ChatWarsMessage{
UserID64: ownUserID64, UserID64: ownUserID64,
ChatID64: updateMsg.Message.ChatID,
MsgDate: updateMsg.Message.Date, MsgDate: updateMsg.Message.Date,
MsgText: string(txt), MsgText: string(txt),
MsgID64: updateMsg.Message.ID, MsgID64: updateMsg.Message.ID,
} }
if senderUserID == ownUserID32 {
m.Direction = Outgoing
} else {
m.Direction = Incoming
}
b, err := json.Marshal(m) b, err := json.Marshal(m)