Add some debug messages
This commit is contained in:
@@ -388,6 +388,9 @@ class TelegramPuppet {
|
|||||||
await this.onUpdate(data.update)
|
await this.onUpdate(data.update)
|
||||||
break
|
break
|
||||||
case "updates":
|
case "updates":
|
||||||
|
// TODO use data.users and data.chats
|
||||||
|
console.log("Received updates users:", data.users)
|
||||||
|
console.log("Received updates chats:", data.chats)
|
||||||
this.date = data.date
|
this.date = data.date
|
||||||
const updateHandlers = []
|
const updateHandlers = []
|
||||||
for (const update of data.updates) {
|
for (const update of data.updates) {
|
||||||
@@ -400,13 +403,14 @@ class TelegramPuppet {
|
|||||||
await this.onUpdate(data)
|
await this.onUpdate(data)
|
||||||
break
|
break
|
||||||
case "updatesTooLong":
|
case "updatesTooLong":
|
||||||
console.log("Handling updatesTooLong")
|
console.log("Handling updatesTooLong", this.pts, this.date)
|
||||||
const dat = await this.client("updates.getDifference", {
|
const dat = await this.client("updates.getDifference", {
|
||||||
pts: this.pts,
|
pts: this.pts,
|
||||||
date: this.date,
|
date: this.date,
|
||||||
qts: -1,
|
qts: -1,
|
||||||
})
|
})
|
||||||
console.log("updatesTooLong data:", dat)
|
console.log("updatesTooLong data:", dat)
|
||||||
|
// TODO use updatesTooLong data?
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
console.log("Unrecognized update type:", data._)
|
console.log("Unrecognized update type:", data._)
|
||||||
|
|||||||
Reference in New Issue
Block a user