From 280a26767089d382c212f3c8ba7a0e82bf8378a0 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 29 Apr 2019 13:57:41 +0800 Subject: [PATCH] strconv --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a165578..c9b8f2e 100644 --- a/main.go +++ b/main.go @@ -111,8 +111,8 @@ func ListenCW(c *tdlib.Client) { } 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() ch, _ := conn.Channel() @@ -144,7 +144,7 @@ func ListenCW(c *tdlib.Client) { MsgText : string(txt), MsgID64 : updateMsg.Message.ID, } - if senderUserID == ownUserID64 { + if senderUserID == ownUserID32 { m.Direction = Outgoing } else { m.Direction = Incoming