This commit is contained in:
shoopea 2019-04-29 13:57:41 +08:00
parent 2a8fcacfb7
commit 280a267670

View File

@ -112,7 +112,7 @@ func ListenCW(c *tdlib.Client) {
return false return false
} }
conn, _ := amqp.Dial("amqp://shoopea:UmDd5g4WRa2MzqOHsG2T@localhost:5672/chatwars/" + ownUserID64) conn, _ := amqp.Dial("amqp://shoopea:UmDd5g4WRa2MzqOHsG2T@localhost:5672/chatwars/" + strconv.FormatInt(ownUserID64, 10))
defer conn.Close() defer conn.Close()
ch, _ := conn.Channel() ch, _ := conn.Channel()
@ -144,7 +144,7 @@ func ListenCW(c *tdlib.Client) {
MsgText : string(txt), MsgText : string(txt),
MsgID64 : updateMsg.Message.ID, MsgID64 : updateMsg.Message.ID,
} }
if senderUserID == ownUserID64 { if senderUserID == ownUserID32 {
m.Direction = Outgoing m.Direction = Outgoing
} else { } else {
m.Direction = Incoming m.Direction = Incoming