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

Control unknown messages #16

Open
manzanit0 opened this issue Aug 12, 2019 · 0 comments
Open

Control unknown messages #16

manzanit0 opened this issue Aug 12, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@manzanit0
Copy link
Owner

manzanit0 commented Aug 12, 2019

Certain interactions, specially in Telegram, send messages with different payloads, for example when interacting with an inlined button, or when sending an image. It would be convenient to adapt the webhook endpoint to simply ignore those and notify the user to not send such messages.

I noticed that button callbacks cause a crash. This was noticed when sending and interacting with the following message:

{
  "chat_id": *****,
	"text": "These are your current subscriptions. Feel free to subscribe or unsubscribe to the lines of your choice!",
	"parse_mode": "markdown",
	"reply_markup": {
		"keyboard":  [
			[
				{
					"text": "Bakerloo ✔️",
					"callback_data": "A1"            
				},
				{
					"text": "Central",
					"callback_data": "A1"            
				}, 
				{
					"text": "Circle",
					"callback_data": "A1"            
				}
			],
			[
				{
					"text": "District",
					"callback_data": "C1"            
				},
				{
					"text": "DLR",
					"callback_data": "A1"            
				},
				{
					"text": "Hammesmith",
					"callback_data": "C1"            
				}],
			[
				{
					"text": "Jubilee",
					"callback_data": "C1"            
				},
				{
					"text": "Overground",
					"callback_data": "C1"            
				},
				{
					"text": "Metropolitan",
					"callback_data": "A1"            
				}],
			[
				{
					"text": "Northern",
					"callback_data": "A1"            
				},
				{
					"text": "Picadilly",
					"callback_data": "A1"            
				},
				{
					"text": "TFL Rail",
					"callback_data": "A1"            
				}
			],
			[
				{
					"text": "Victoria ✔️",
					"callback_data": "A1"            
				},
				{
					"text": "Waterloo",
					"callback_data": "A1"            
				}]
		]}
}
@manzanit0 manzanit0 added the bug Something isn't working label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant