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

InlineQueryResultPhoto from bot not show big images #7654

Closed
AlexMercier opened this issue Apr 17, 2020 · 2 comments
Closed

InlineQueryResultPhoto from bot not show big images #7654

AlexMercier opened this issue Apr 17, 2020 · 2 comments

Comments

@AlexMercier
Copy link

AlexMercier commented Apr 17, 2020

Using Inline method the Desktop App not show 'photo' items with big images passed in photo_url in InlineQueryResultPhoto. Client just ignore this items and not show it.
Same Inline items successfuly displayed on mobile clients.
Additionaly: If I send this Item firstly from mobile client, then desktop client also will show this image due to image was cached by telegram. So my test bot using everytime random url for preventing cache.

In screenshot you can see compare that one Inline item is missed in Desktop client
https://i.imgur.com/qNPL5Gs.png

For testing I wrote bot to demonstrate bug t.me/TestInlineMixedBot

Steps to reproduce

  1. Open bot, and type inline command @TestInlineMixedBot test_url
    (or press button 'Test inline file url' in bot)
    You might think that the command did not work coz client ignore show item, but it did work. just try to run it on mobile.
  2. FInal. As result The desktop app not show this image item.
    Description: Everytime when you call this command the bot generate unique photo_url link to show inline query photo item. It maded to prevent telegram cache. in other way bug can't be reproduced

And see attached video: from mobile and from desktop

  1. https://i.imgur.com/CN24jgm.mp4 - no bug, via Android client
  2. https://i.imgur.com/tD6wBJw.gif - the bug reproduced, Desktop client
    ps: in second video the inline query with no_random parameter show image which previosly cached by telegram
    pps: i use doge for thumb_url :)

Also bot have command @TestInlineMixedBot all which show inline mixed content (photo by file_id, photo by url, and html text in one request). And typing this command you can see that in Desktop client the item photo by url will be skipped by client side

Expected behaviour

I expected result like in mobile - After typing inline command the desktop client must show me thumb photo item with small preview image from thumb_url link passed as required field while big image is loading

Actual behaviour

In fact the client just ignore item with big image if this image was not cached previosly.

php code for example how I create item

$random_seed =  substr(md5(date("D M d, Y G:i s")), 0, 8).intval(date("s"));//random seed for prevent caching because telegram may cache imagefirstly sended from mobile, and bug can't be reproduced
$big_photo_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Big_Pine_landscape.jpg/1083px-Big_Pine_landscape.jpg?rnd=$random_seed";
$thumb_256 = 'https://www.sololearn.com/avatars/0484e214-95d9-46a7-9b31-09ab8f6d3b80.jpg';
$inline_item_by_file_url = array('type'=>'photo', 'id'=>'item_2', 'photo_url'=>$big_photo_url,'thumb_url'=>$thumb_256, 'title'=>"Wow", 'description'=>'Test by url');

tested with many big images.

PPS offtop: Also I noticed that ios developers Team ignored thumb_url they just show blank preview while big image loading:)

Configuration

Operating system: Windows 10, x64

Version of Telegram Desktop: v2.0.1

@ilya-fedin
Copy link
Contributor

#4580

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants