diff --git a/client.go b/client.go index cd7cae6..172c803 100644 --- a/client.go +++ b/client.go @@ -16,16 +16,13 @@ func clientSendCWMsg(userID64 int64, s string) { MQTGCmdQueue <- c } -func clientRefreshCWMsg(chatID64 int64, msgID64 int64) { +func clientRefreshCWMsg(userID64 int64, chatID64 int64, msgID64 int64) { c := TGCommand{ Type: commandRefreshMsg, + FromUserID64: userID64, FromChatID64: chatID64, FromMsgID64: msgID64, } - - b, _ := json.Marshal(c) - log.Printf("clientRefreshCWMsg:\n%s\n", string(b)) - MQTGCmdQueue <- c } diff --git a/job.go b/job.go index 2852dba..41a14a3 100644 --- a/job.go +++ b/job.go @@ -367,7 +367,6 @@ func jobMsgRefresh(j Job) { err = json.Unmarshal(j.Payload, &p) logOnError(err, "jobMsgRefresh : Unmarshal payload") - log.Printf("jobMsgRefresh : %d\n", p.ObjID64) m, err := getObjMsg(p.ObjID64) logOnError(err, "jobMsgRefresh : getObjMsg") @@ -375,9 +374,7 @@ func jobMsgRefresh(j Job) { err = delObj(p.ObjID64) logOnError(err, "jobMsgRefresh : delObj") - log.Printf("Refreshing message :\n%s\n", m.Text) - - clientRefreshCWMsg(m.ChatID64, m.ID64) + clientRefreshCWMsg(m.UserID64, m.ChatID64, m.ID64) err = setJobDone(j.ID64) logOnError(err, "joMsgClient : setJobDone") diff --git a/workers.go b/workers.go index 2a96fe7..dcc157a 100644 --- a/workers.go +++ b/workers.go @@ -334,6 +334,8 @@ func MQTGCmdWorker(id int, cmds <-chan TGCommand) { Body: []byte(j), }) logOnError(err, "MQTGCmdWorker["+strconv.Itoa(id)+"] : Publishing message.") + } else { + log.Printf("MQTGCmdWorker["+strconv.Itoa(id)+"] : client %d offline.\n", c.FromUserID64) } }