fix(core): call Conversation.handleUpdate on the wrapper client

This commit is contained in:
alina 🌸 2024-05-30 00:13:55 +03:00
parent 41a3575805
commit c0ae65b60f
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
2 changed files with 2 additions and 2 deletions

View file

@ -5426,7 +5426,7 @@ export class TelegramClient extends EventEmitter implements ITelegramClient {
makeParsedUpdateHandler({
messageGroupingInterval,
onUpdate: (update) => {
if (Conversation.handleUpdate(this._client, update) && skipConversationUpdates) return
if (Conversation.handleUpdate(this, update) && skipConversationUpdates) return
this.emit('update', update)
this.emit(update.name, update.data)

View file

@ -73,7 +73,7 @@ function _initializeClient(this: TelegramClient, opts: TelegramClientOptions) {
makeParsedUpdateHandler({
messageGroupingInterval,
onUpdate: (update) => {
if (Conversation.handleUpdate(this._client, update) && skipConversationUpdates) return
if (Conversation.handleUpdate(this, update) && skipConversationUpdates) return
this.emit('update', update)
this.emit(update.name, update.data)