Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Ban non-spammer users #1

Open
pabluk opened this issue Sep 11, 2020 · 0 comments
Open

Ban non-spammer users #1

pabluk opened this issue Sep 11, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@pabluk
Copy link
Member

pabluk commented Sep 11, 2020

Today a non-spammer user was banned even if he/she joined the group via the invite link.
This was the timeline:

  1. User joins via invite link
  2. Bot detected an auto-join and ban User
  3. Channel admin unban the User
  4. Channel admin disable Bot
  5. User tries again using the same link
  6. Channel admin re-enable the Bot

Below, you'll find payloads received by Bot during these interactions (for privacy reason IDs were edited):

1st connection

{
    "@type": "updateNewMessage",
    "message": {
        "@type": "message",
        "author_signature": "",
        "can_be_deleted_for_all_users": false,
        "can_be_deleted_only_for_self": false,
        "can_be_edited": false,
        "can_be_forwarded": false,
        "chat_id": -1000000000000,
        "contains_unread_mention": false,
        "content": {
            "@type": "messageChatAddMembers",
            "member_user_ids": [
                1234567890
            ]
        },
        "date": 1599811769,
        "edit_date": 0,
        "id": 950000000,
        "is_channel_post": false,
        "is_outgoing": false,
        "media_album_id": "0",
        "reply_to_message_id": 0,
        "restriction_reason": "",
        "sender_user_id": 1234567890,
        "ttl": 0,
        "ttl_expires_in": 0.0,
        "via_bot_user_id": 0,
        "views": 0
    }
}

2nd connection

{
    "@type": "updateNewMessage",
    "message": {
        "@type": "message",
        "author_signature": "",
        "can_be_deleted_for_all_users": false,
        "can_be_deleted_only_for_self": false,
        "can_be_edited": false,
        "can_be_forwarded": false,
        "chat_id": -1000000000000,
        "contains_unread_mention": false,
        "content": {
            "@type": "messageChatJoinByLink"
        },
        "date": 1599817964,
        "edit_date": 0,
        "id": 950000001,
        "is_channel_post": false,
        "is_outgoing": false,
        "media_album_id": "0",
        "reply_to_message_id": 0,
        "restriction_reason": "",
        "sender_user_id": 1234567890,
        "ttl": 0,
        "ttl_expires_in": 0.0,
        "via_bot_user_id": 0,
        "views": 0
    }
}
@pabluk pabluk added the bug Something isn't working label Sep 11, 2020
@pabluk pabluk changed the title Ban legitimate users Ban non-spammer users Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant