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

Sometimes UpdateNewMessage received with empty Capture text in MessegePhoto #2194

Closed
igolyudov opened this issue Nov 1, 2022 · 3 comments
Closed

Comments

@igolyudov
Copy link

igolyudov commented Nov 1, 2022

Why do i sometimes receive UpdateNewMessage with empty Capture text in MessegePhoto?

UpdateNewMessage `` 2022-11-01 01:04:19 [TDLib thread] DEBUG r.v.i.t.TelegramClient - > Add new Message to queue:UpdateNewMessage { message = Message { id = 82253447168 senderId = MessageSenderChat { chatId = -1001105313000 } chatId = -1001105313000 sendingState = null schedulingState = null isOutgoing = false isPinned = false canBeEdited = false canBeForwarded = true canBeSaved = true canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canGetAddedReactions = false canGetStatistics = false canGetMessageThread = false canGetViewers = false canGetMediaTimestampLinks = true hasTimestampedMedia = true isChannelPost = true containsUnreadMention = false date = 1667253842 editDate = 0 forwardInfo = null interactionInfo = MessageInteractionInfo { viewCount = 1 forwardCount = 0 replyInfo = null reactions = vector[0] { } } unreadReactions = vector[0] { } replyInChatId = 0 replyToMessageId = 0 messageThreadId = 0 ttl = 0 ttlExpiresIn = 0.000000 viaBotUserId = 0 authorSignature = "" mediaAlbumId = 13338024008747178 restrictionReason = "" content = MessagePhoto { photo = Photo { hasStickers = false minithumbnail = Minithumbnail { width = 40 height = 33 data = bytes [778] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } sizes = vector[3] { PhotoSize { type = "m" photo = File { id = 1535 size = 13125 expectedSize = 13125 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAANtAAMkBA" uniqueId = "AQAD28MxG1qgAUty" isUploadingActive = false isUploadingCompleted = true uploadedSize = 13125 } } width = 320 height = 268 progressiveSizes = vector[0] { } } PhotoSize { type = "y" photo = File { id = 1537 size = 37764 expectedSize = 37764 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAAN5AAMkBA" uniqueId = "AQAD28MxG1qgAUt-" isUploadingActive = false isUploadingCompleted = true uploadedSize = 37764 } } width = 940 height = 788 progressiveSizes = vector[4] { 4772 10728 19662 26158 } } PhotoSize { type = "x" photo = File { id = 1536 size = 44057 expectedSize = 44057 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAAN4AAMkBA" uniqueId = "AQAD28MxG1qgAUt9" isUploadingActive = false isUploadingCompleted = true uploadedSize = 44057 } } width = 800 height = 671 progressiveSizes = vector[0] { } } } } caption = FormattedText { text = "" entities = vector[0] { } } isSecret = false } replyMarkup = null } } ``
But Chat object have Capture text from last message.
Chat ``` 2022-11-01 01:04:19 [TDLib thread] DEBUG r.v.i.t.TelegramClient - > Chat info:Chat { id = -1001105313000 type = ChatTypeSupergroup { supergroupId = 1105313000 isChannel = true } title = "УНИАН - новости Украины | война с Россией | новини України | війна з Росією | УНІАН" photo = ChatPhotoInfo { small = File { id = 1443 size = 0 expectedSize = 0 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AQADAgAD2LgxG1mMMUsACAIAAxgzeekW____xo0W63qdHpMkBA" uniqueId = "AQAD2LgxG1mMMUsAAQ" isUploadingActive = false isUploadingCompleted = true uploadedSize = 0 } } big = File { id = 1444 size = 0 expectedSize = 0 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AQADAgAD2LgxG1mMMUsACAMAAxgzeekW____xo0W63qdHpMkBA" uniqueId = "AQAD2LgxG1mMMUsB" isUploadingActive = false isUploadingCompleted = true uploadedSize = 0 } } minithumbnail = Minithumbnail { width = 8 height = 8 data = bytes [641] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } hasAnimation = false } permissions = ChatPermissions { canSendMessages = false canSendMediaMessages = false canSendPolls = false canSendOtherMessages = false canAddWebPagePreviews = false canChangeInfo = false canInviteUsers = false canPinMessages = false } lastMessage = Message { id = 82252398592 senderId = MessageSenderChat { chatId = -1001105313000 } chatId = -1001105313000 sendingState = null schedulingState = null isOutgoing = false isPinned = false canBeEdited = false canBeForwarded = true canBeSaved = true canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canGetAddedReactions = false canGetStatistics = false canGetMessageThread = false canGetViewers = false canGetMediaTimestampLinks = true hasTimestampedMedia = true isChannelPost = true containsUnreadMention = false date = 1667253841 editDate = 0 forwardInfo = null interactionInfo = MessageInteractionInfo { viewCount = 1 forwardCount = 0 replyInfo = null reactions = vector[0] { } } unreadReactions = vector[0] { } replyInChatId = 0 replyToMessageId = 0 messageThreadId = 0 ttl = 0 ttlExpiresIn = 0.000000 viaBotUserId = 0 authorSignature = "" mediaAlbumId = 13338024008747178 restrictionReason = "" content = MessagePhoto { photo = Photo { hasStickers = false minithumbnail = Minithumbnail { width = 40 height = 32 data = bytes [823] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } sizes = vector[3] { PhotoSize { type = "m" photo = File { id = 1532 size = 29705 expectedSize = 29705 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAANtAAMkBA" uniqueId = "AQAD2sMxG1qgAUty" isUploadingActive = false isUploadingCompleted = true uploadedSize = 29705 } } width = 320 height = 256 progressiveSizes = vector[0] { } } PhotoSize { type = "x" photo = File { id = 1533 size = 110491 expectedSize = 110491 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAAN4AAMkBA" uniqueId = "AQAD2sMxG1qgAUt9" isUploadingActive = false isUploadingCompleted = true uploadedSize = 110491 } } width = 800 height = 640 progressiveSizes = vector[0] { } } PhotoSize { type = "y" photo = File { id = 1534 size = 168518 expectedSize = 168518 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAAN5AAMkBA" uniqueId = "AQAD2sMxG1qgAUt-" isUploadingActive = false isUploadingCompleted = true uploadedSize = 168518 } } width = 1280 height = 1024 progressiveSizes = vector[4] { 18419 48411 70422 104721 } } } } caption = FormattedText { text = "Не так страшны руснявые ракеты, как оповещения от ГСЧС 😅" entities = vector[1] { TextEntity { offset = 0 length = 54 type = TextEntityTypeBold { } } } } isSecret = false } replyMarkup = null } positions = vector[0] { } messageSenderId = null hasProtectedContent = false isMarkedAsUnread = false isBlocked = false hasScheduledMessages = false canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canBeReported = true defaultDisableNotification = false unreadCount = 2 lastReadInboxMessageId = 82250301440 lastReadOutboxMessageId = 2251799812636672 unreadMentionCount = 0 unreadReactionCount = 0 notificationSettings = ChatNotificationSettings { useDefaultMuteFor = false muteFor = 480235729 useDefaultSound = true soundId = -1 useDefaultShowPreview = false showPreview = true useDefaultDisablePinnedMessageNotifications = true disablePinnedMessageNotifications = false useDefaultDisableMentionNotifications = true disableMentionNotifications = false } availableReactions = vector[8] { "👍" "👎" "❤" "🔥" "👏" "😁" "😱" "😢" } messageTtl = 0 themeName = "" actionBar = null videoChat = VideoChat { groupCallId = 0 hasParticipants = false defaultParticipantId = null } pendingJoinRequests = null replyMarkupMessageId = 0 draftMessage = null clientData = "" } ```

How can i get text from new received messages?

@levlam
Copy link
Contributor

levlam commented Nov 1, 2022

If message caption is empty in updateNewMessage, then message has no caption. There is nothing to receive. In your example message 82253447168 was received in updateNewMessage and message 82252398592 is the last message.

@igolyudov
Copy link
Author

Оh, thx. Now i see that. But official mobile client show this messages like one post.
ow can i union 82253447168 and 82252398592?

@levlam
Copy link
Contributor

levlam commented Nov 1, 2022

The messages have the same mediaAlbumId.

@levlam levlam closed this as completed Dec 22, 2022
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