telegramdesktop / tdesktop

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

Support grabbing of opengraph information from .co domains #4143

Closed ncovercash closed 6 years ago

ncovercash commented 6 years ago

Steps to reproduce

  1. Make a .co domain name with opengraph metadata (I used https://commiso.co/)
  2. Send a message with it

Expected behaviour

An embed is shown

Actual behaviour

No embed

Configuration

Windows 10

1.1.23

Night mode

ncovercash commented 6 years ago

Example:

image

image

stek29 commented 6 years ago

Links are "grabbed" on server side

auchri commented 6 years ago

@smileytechguy Well, I checked your site and a cause might be that you use single quotes for the meta tags: <meta name='robots' content='index,follow'/>.

Theoretically it should not make any difference, but you could try to change them to double quotes ". Also I don't know if this is the real issue.

ncovercash commented 6 years ago

@auchri Alright, thanks for looking! I'll try that!

auchri commented 6 years ago

@smileytechguy Also you have <meta name="og:description" content="..."/> but it should be <meta property="og:description" content="..."/>.

See http://ogp.me/#optional

ncovercash commented 6 years ago

@auchri that might make a difference, let me try that. I did the same with og:site_name. Your initial suggestion with the ' vs " yielded no change. Thanks for your help!

ncovercash commented 6 years ago

@auchri No change with the property vs name. Also, http://opengraphcheck.com/result.php?url=https%3A%2F%2Fcommiso.co%2F%3Faaa shows all the tags that I have.

ncovercash commented 6 years ago

Yeah, it seems to be an issue with .co. My domain https://smileytechguy.com/ works fine, and I copied all the tags for this one from there

auchri commented 6 years ago

@smileytechguy Maybe the wrong preview is cached on the servers 🤷🏼‍♂️ I don't know

ncovercash commented 6 years ago

@auchri I added a URL parameter to test, same problem. /shrug

stek29 commented 6 years ago

@smileytechguy Try to open it via https://instantview.telegram.org

auchri commented 6 years ago

@stek29 image

auchri commented 6 years ago

@smileytechguy Do you find any access from the Telegram bot in your access logs?

auchri commented 6 years ago

And can you create an test site?

E.g. https://commiso.co/test.html:

<html>
<head>
<title> test </title>
<meta property="og:description" content="Eine Testseite" />
</head>

<body>
test
</body>

</html>
ncovercash commented 6 years ago

Sorry, didn't see this until now. The test page works fine... I'd imagine there is some caching error from before I added the open graph tags

ncovercash commented 6 years ago

Well, I've figured it out. Adding an image makes it work!

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.