Skip to content

Bot cannot leave chat that has been restricted due to supposed violations #864

Description

@php4fan

A group where my bot is an admin has recently been restricted by Telegram's Artificial Stupidity for supposedly violating some terms of services - obviously BS but that's irrelevant.

The issue is that when the bot attempts to make a request to leaveChat it gets the error:

Bad Request: CHAT_INVALID

Several issues here:

  1. The most egregious, you should always be allowed to leave a chat no matter what as long as the chat exists.
  2. The error message should be an English sentence explaining why the request failed, not an internal string ID that only the developers know the meaning of, and that is not documented anywhere in the Bot API documentation.
  3. Even that string ID is inconsistent with the one you get with other requests for the same reason: a sendMessage request in the same chat gets the error CHAT_RESTRICTED, while leaveChat gets CHAT_INVALID. CHAT_INVALID is even more meaningless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions