test
This commit is contained in:
parent
56ce43a593
commit
2063c42b78
2
main.go
2
main.go
@ -65,6 +65,6 @@ func main() {
|
||||
ownUserID32 = OwnUserID(client)
|
||||
ownUserID64 = int64(OwnUserID(client))
|
||||
|
||||
getHistory(client, chtwrsID64)
|
||||
getHistory(client, &chtwrsID64)
|
||||
|
||||
}
|
||||
|
9
td.go
9
td.go
@ -10,19 +10,22 @@ import (
|
||||
"github.com/Arman92/go-tdlib"
|
||||
)
|
||||
|
||||
func getHistory(c *tdlib.Client, chatID64 int64) {
|
||||
func getHistory(c *tdlib.Client, chatID64 *int64) {
|
||||
var msgCount int32 = 0
|
||||
var msgParsed int32 = 0
|
||||
var loopOverflow int32 = 0
|
||||
var lastParsedID64 int64 = int64(math.MaxInt64)
|
||||
var lastParsedTime time.Time = time.Now()
|
||||
var m ChatWarsMessage
|
||||
var chat int64
|
||||
|
||||
fmt.Printf("Getting details for chatID64 %d ...\n", chatID64)
|
||||
chat = *chatID64
|
||||
|
||||
fmt.Printf("Getting details for chatID64 %d ...\n", chat)
|
||||
|
||||
chatDetails, err := c.GetChat(chatID64)
|
||||
failOnError(err, "getHistory : GetChat")
|
||||
fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chatID64, chatDetails.Title)
|
||||
fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title)
|
||||
|
||||
for lastParsedID64 >= 0 {
|
||||
prevLastParsedID64 := lastParsedID64
|
||||
|
Loading…
Reference in New Issue
Block a user