Giter VIP home page Giter VIP logo

Comments (9)

levlam avatar levlam commented on July 18, 2024 1

@midnightcoder-pro Thanks! Fixed in Bot API 5.0.1.

from telegram-bot-api.

levlam avatar levlam commented on July 18, 2024

Could you provide an example of the issue, including raw updates received by the bot?

from telegram-bot-api.

mytecor avatar mytecor commented on July 18, 2024

https://api.telegram.org/botToken/getUpdates returns normally result, but sometimes there is no media_group_id field. Or should I create blank bot, channel and linked group to provide an example?

getUpdates (personal information removed)
[
	// original posts in channel
	{
		"channel_post": {
			"message_id": 735,
			"sender_chat": {
				"type": "channel"
			},
			"chat": {
				"type": "channel"
			},
			"media_group_id": "replaced", // here it is 
			"photo": []
		}
	},
	{
		"channel_post": {
			"message_id": 736,
			"sender_chat": {
				"type": "channel"
			},
			"chat": {
				"type": "channel"
			},
			"media_group_id": "replaced",
			"photo": []
		}
	},

	// reposts in comments chat
	{
		"message": {
			// there is no media_group_id field here 😥
			"from": {
				"id": 777000,
				"is_bot": false,
				"first_name": "Telegram"
			},
			"sender_chat": {
				"type": "channel"
			},
			"chat": {
				"type": "supergroup"
			},
			"forward_from_chat": {
				"type": "channel"
			},
			"forward_from_message_id": 735,
			"photo": []
		}
	},
	{
		"message": {
			"from": {
				"id": 777000,
				"is_bot": false,
				"first_name": "Telegram"
			},
			"sender_chat": {
				"type": "channel"
			},
			"chat": {
				"type": "supergroup"
			},
			"forward_from_chat": {
				"type": "channel"
			},
			"forward_from_message_id": 736,
			"photo": []
		}
	}
]

from telegram-bot-api.

luckydonald avatar luckydonald commented on July 18, 2024

Would allowed_updates=media_group_id work?
My bet is that those are indeed regular (non-album) photos.

from telegram-bot-api.

mytecor avatar mytecor commented on July 18, 2024

There is no media_group_id update type in https://core.telegram.org/bots/api#update

from telegram-bot-api.

luckydonald avatar luckydonald commented on July 18, 2024

But there's no photo either...

from telegram-bot-api.

mytecor avatar mytecor commented on July 18, 2024

It doesn't matter, it still gets data with an error
(I use telegraf nodejs lib, that's why I added their subtype to the query out of habit)

from telegram-bot-api.

levlam avatar levlam commented on July 18, 2024

@midnightcoder-pro Could you send full received updates with all fields to @tdlib_bot in Telegram?

from telegram-bot-api.

mytecor avatar mytecor commented on July 18, 2024

@levlam ok, I sent

from telegram-bot-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.