test forward from bottext

This commit is contained in:
shoopea 2019-10-21 10:25:41 +08:00
parent 0338338c14
commit 8032944160
2 changed files with 13 additions and 11 deletions

14
bot.go
View File

@ -103,17 +103,19 @@ func botText(m *tb.Message) {
b, _ := json.Marshal(m)
log.Printf("botText : %s\n", string(b))
/*
if (m.Chat.ID == cfg.Bot.Depositchat && int64(m.OriginalSender) == 408101137) {
if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && int64(m.OriginalSender) == chtwrsbotID64 {
cwm := ChatWarsMessage{
TGUserID64: int64(m.Sender.ID),
TGSenderUserID64: int64(m.OriginalSender),
TGSenderUserID64: chtwrsbotID64,
ID64: int64(m.ID),
ChatID64: updateMsg.Message.ChatID,
Text: txt,
ChatID64: int64(m.Chat.ID),
Text: m.Text,
Date: m.Time().UTC(),
IsForwarded: true,
}
MQCWMsgQueue <- cwm
}
*/
// all the text messages that weren't
// captured by existing handlers
}

View File

@ -387,7 +387,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
_, err := parseSubTypeMessageQuestResultAmbush(m, rule.re)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageQuestResultAmbush.")
if m.Date.Add(3 * time.Minute).After(time.Now().UTC()) {
if m.ChatID64 == chtwrsbotID64 {
if m.ChatID64 == chtwrsbotID64 && m.TGSenderUserID64 == chtwrsbotID64 {
s := TGCommand{
Type: commandForwardMsg,
FromUserID64: m.TGUserID64,