telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.28k stars 5.22k forks source link

"Empty message" when only the photo is #5867

Closed Lonami closed 3 years ago

Lonami commented 5 years ago

See https://t.me/telethonofftopic/179050 for an example. This is what Telegram Desktop v1.6.3 shows: image

This is what the message actually has:

Message:
  id: 179050
  to_id: PeerChannel: channel_id: 1200633650  
  date: 2019-03-01 13:57:18
  message: 'User Info:\n\nFirst Name: Deleted Account\nUser id: 473862645\nPermanent user link: link\n\nYou have 5 chats in common with this user'
  out: False
  mentioned: False
  media_unread: False
  silent: False
  post: False
  from_scheduled: False
  from_id: 416195206
  reply_to_msg_id: 8
  media: MessageMediaPhoto:
    photo: PhotoEmpty: id: 2035224563527297246      
  entities: 
    - MessageEntityBold:
        offset: 0
        length: 10      
    - MessageEntityCode:
        offset: 49
        length: 9      
    - MessageEntityCode:
        offset: 95
        length: 1

It would be helpful if it showed at least the caption, and ideally (if no photo is shown), indicate that the photo is hidden.

john-preston commented 5 years ago

@Lonami This is an invalid photo, it should not happen really.

Lonami commented 5 years ago

So it's so rare that it's not worth fixing it, you say? I mean I respect that, but I found it funny that some information (caption) is "lost". Search also finds it:

image

And link previews: image

(by the way, while taking those screenshots I edited an old message and it always shows 0:00: image recent messages don't show that time at all)

john-preston commented 5 years ago

I'm not sure how such non-existing-image-with-caption should be shown anyway. It's not a valid case, it wasn't in any designs etc.

Lonami commented 5 years ago

Some clients (Telegram for Android?) render the photo blank and the caption below (taken from https://t.me/tgandroidtests/71762):

But yes, we can no longer make the issue happen (perhaps something changed server side and they sent the photo back then).

SpEcHiDe commented 5 years ago

The same empty photo is happening here: https://t.me/ThankTelegram/20916 I think it is because the account is deleted, manually. I hope the caption is shown in similar to how the android client handles it.

Aokromes commented 4 years ago

this issue is still valid?

Lonami commented 4 years ago

Well, the empty messages still show as such in https://t.me/telethonofftopic/179050 and https://t.me/telethonofftopic/178924, so I would think so.

Showing the current date and the empty message below: image

FabianPastor commented 4 years ago

A way to reproduce it to be able to check this case on TDesktop.

You need a bot account and a test account.

1) Set a Profile Photo on the test account. 2) Add the bot to a group 3) Add the test account 4) Receive the event of the test account joining the chat. 5) Use the bot api method getUserProfilePhotos with the ID of the test account 6) Send the bot api method sendPhoto with one of the _fileid received by the method above to the group. 7) Test Account should now delete their account Profile Photo 8) Restart TDesktop and enter the group

The empty message will show up.

penn5 commented 4 years ago

A way to reproduce it to be able to check this case on TDesktop.

You need a bot account and a test account.

1. Set a **Profile Photo** on the test account.

2. Add the bot to a group

3. Add the test account

4. Receive the event of the test account joining the chat.

5. Use the bot api method **getUserProfilePhotos** with the ID of the test account

6. Send the bot api method **sendPhoto** with one of the _file_id_ received by the method above to the group.

7. Test Account should now delete their account Profile Photo

8. Restart TDesktop and enter the group

The empty message will show up.

I think this exact procedure is happening in normal usage by real users - people running a whois userbot command send the profile pic, and if the account is deleted, the entire message is lost. https://t.me/UserbotTesting/88974

stale[bot] commented 3 years ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

SpEcHiDe commented 3 years ago

🤒 this issue still exists here.

Links https://t.me/mypersonalchat/95552

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.