diff --git a/client.go b/client.go index 96421c6..1aca8f5 100644 --- a/client.go +++ b/client.go @@ -14,6 +14,16 @@ func clientSendCWMsg(userID64 int64, s string) { MQTGCmdQueue <- c } +func clientRefreshCWMsg(chatID64 int64, msgID64 int64) { + c := TGCommand{ + Type: commandRefreshMsg, + FromChatID64: chatID64, + FromMsgID64: msgID64, + } + + MQTGCmdQueue <- c +} + func clientMsgMeAck(m *ChatWarsMessageMeAck) { if _, ok := clientsQueue[m.Msg.UserID64]; ok { if v, ok := clientsCW.Load(m.Msg.UserID64); ok { diff --git a/job.go b/job.go index fda4afd..2852dba 100644 --- a/job.go +++ b/job.go @@ -377,12 +377,7 @@ func jobMsgRefresh(j Job) { log.Printf("Refreshing message :\n%s\n", m.Text) - c := TGCommand{ - Type: commandRefreshMsg, - FromChatID64: m.ChatID64, - FromMsgID64: m.ID64, - } - MQTGCmdQueue <- c + clientRefreshCWMsg(m.ChatID64, m.ID64) err = setJobDone(j.ID64) logOnError(err, "joMsgClient : setJobDone")