test forward from bottext
This commit is contained in:
parent
0338338c14
commit
8032944160
22
bot.go
22
bot.go
@ -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) {
|
||||
cwm := ChatWarsMessage{
|
||||
TGUserID64: int64(m.Sender.ID),
|
||||
TGSenderUserID64: int64(m.OriginalSender),
|
||||
ID64: int64(m.ID),
|
||||
ChatID64: updateMsg.Message.ChatID,
|
||||
Text: txt,
|
||||
}
|
||||
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: chtwrsbotID64,
|
||||
ID64: int64(m.ID),
|
||||
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
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user