Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get notified when a message is edited #378

Open
gmag11 opened this issue May 29, 2024 · 3 comments
Open

Cannot get notified when a message is edited #378

gmag11 opened this issue May 29, 2024 · 3 comments

Comments

@gmag11
Copy link
Contributor

gmag11 commented May 29, 2024

Hi,
I'm trying to get notified when a message on which bot is Administrator. I get all new messages but I do not get any event when a messages is edited from Telegram app.

This is the nodes I am using:
[
    {
        "id": "67a7c97f9176e170",
        "type": "debug",
        "z": "3baecdc6659f7c66",
        "name": "debug 63",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 400,
        "y": 2440,
        "wires": []
    },
    {
        "id": "f981cabb966ccc6f",
        "type": "telegram event",
        "z": "3baecdc6659f7c66",
        "name": "",
        "bot": "f1ce858167eb885e",
        "event": "edited_message",
        "autoanswer": false,
        "x": 160,
        "y": 2440,
        "wires": [
            [
                "67a7c97f9176e170"
            ]
        ]
    },
    {
        "id": "f1ce858167eb885e",
        "type": "telegram bot",
        "botname": "xxxxxxx_bot",
        "usernames": "",
        "chatids": "",
        "baseapiurl": "",
        "updatemode": "webhook",
        "pollinterval": "300",
        "usesocks": false,
        "sockshost": "",
        "socksprotocol": "socks5",
        "socksport": "6667",
        "socksusername": "anonymous",
        "sockspassword": "",
        "bothost": "xxxx.xxxxx.com",
        "botpath": "",
        "localbotport": "8080",
        "publicbotport": "443",
        "privatekey": "",
        "certificate": "",
        "useselfsignedcertificate": false,
        "sslterminated": true,
        "verboselogging": true
    }
]

I've checked that privacy mode is off and bot has all permissions.

Is there any additional requirement?

@gmag11
Copy link
Contributor Author

gmag11 commented May 29, 2024

I've got additional diag data. When node registers webhook I can see this in console log.

Webhook enabled:
{"url":"https://xxxxxxxx.pro:443/0000000041:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","has_custom_certificate":false,"pending_update_count":0,"max_connections":40,"ip_address":"1.2.3.4","allowed_updates":["message","callback_query"]}

Shouldn't allowed_updates contain more items from https://core.telegram.org/bots/api#update?

I've tried selecting polling mode too with same result.

@windkh
Copy link
Owner

windkh commented Jun 21, 2024

@gmag11 I tested the following scenarios:

  • bot admin in supergroup: nothing received
  • bot admin in normal chat (1 to 1): here it works as expected
  • bot admin in group: here it works as expected
  • bot admin in channel: nothing received

So it seems that the event is not raised in channels and supergroups.

@gmag11
Copy link
Contributor Author

gmag11 commented Jun 22, 2024

I'm receiving edits from supergroup normally using node-red-node-telegrambot.
Telegram docs says that bot can only get notification for edits in messages sent after the bot is made admin of the channel or supergroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants