-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hello Remi! Everything works fine initially: when a user writes to the bot, a new chat is created in LHC and a corresponding Topic is created in the Telegram admin group.
The Problem:
If an administrator manually deletes the Topic in the Telegram group (while the chat still exists in the LHC database), any subsequent messages from that user fail to create a new chat or update the existing one.
Instead of creating a new topic, the system throws an exception in the Audit Log:
sendMessages: 400 Bad Request: TOPIC_DELETED
Steps to reproduce:
- A user writes a message to the Telegram bot.
- A chat opens in LHC, and a Topic is created in the Telegram admin group.
- The administrator manually deletes the Topic inside the Telegram app.
- The user sends a new message to the bot.
- Result: The message does not appear in LHC. The Audit Log shows
telegram_exceptionwithTOPIC_DELETED.
Current Workaround:
Even if I mark the chat as "Closed" in LHC, the error persists.
The only way to receive messages from this user again is to go into the LHC interface, find the specific chat history, and perform a "Delete chat" action completely. Once the old chat record is deleted from LHC, the next message from the user successfully creates a new chat and a new Topic.
Expected Behavior:
If the plugin receives a TOPIC_DELETED error from the Telegram API, it should treat the session as expired/invalid and create a new chat/topic for the incoming message, rather than failing silently.