From 78c749ccddbad6f51bc672798371a77793394ed0 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 26 Jan 2020 22:04:24 +0800 Subject: [PATCH] fix delete --- bot.go | 3 ++- job.go | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bot.go b/bot.go index cad26dd..c51dddd 100644 --- a/bot.go +++ b/bot.go @@ -672,7 +672,8 @@ func botGStock(m *ChatWarsMessage) { TGCmdQueue <- c return } - userID64 := clt.TGUserID64 + userID64 := cfg.Bot.Admin + //userID64 := clt.TGUserID64 clt.Mux.Unlock() p := JobPayloadGStock{ diff --git a/job.go b/job.go index e5ce7a7..a0a6af2 100644 --- a/job.go +++ b/job.go @@ -2051,12 +2051,7 @@ func jobGetVault(j Job) { /* clean up the messages */ for _, d := range p.CleanupMsg { - delmsg := tb.StoredMessage{ - MessageID: fmt.Sprintf("%d", d.ID64), - ChatID: d.ChatID64, - } - err = bot.Delete(delmsg) - logOnError(err, "jobGetVault : Delete") + clientDelTGMsg(j.UserID64, d.ID64, d.ChatID64) } /* wake up the callback */