upd
This commit is contained in:
parent
9e157a1945
commit
816189a158
4
main.go
4
main.go
@ -32,8 +32,8 @@ type Config struct {
|
||||
var (
|
||||
config = flag.String("config", "gocw2.cfg", "config file path")
|
||||
history = flag.Bool("history", false, "initialize chat history")
|
||||
historyChatID64 = flag.int64("chat_id", nil, "chat to historize")
|
||||
historySenderUserID64 = flag.int64("sender_user_id", nil, "sender_user_id to historize")
|
||||
historyChatID64 = flag.Int64("chat_id", 0, "chat to historize")
|
||||
historySenderUserID64 = flag.Int64("sender_user_id", 0, "sender_user_id to historize")
|
||||
|
||||
cfg Config
|
||||
|
||||
|
6
td.go
6
td.go
@ -72,10 +72,10 @@ func getHistory(c *tdlib.Client, chatID64 int64, senderUserID64 int64) {
|
||||
var msgCount int32 = 0
|
||||
var lastMsgTime time.Time = time.Now()
|
||||
|
||||
if chatID64 == nil {
|
||||
c := user_chtwrsbot
|
||||
if chatID64 == 0 {
|
||||
chat := user_chtwrsbot
|
||||
} else {
|
||||
c = chatID64
|
||||
chat = chatID64
|
||||
}
|
||||
|
||||
for lastMsgID64 >= 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user