-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use Twitter OG tags if no Twitter credentials are configured #522
Use Twitter OG tags if no Twitter credentials are configured #522
Conversation
Codecov Report
@@ Coverage Diff @@
## master #522 +/- ##
==========================================
+ Coverage 46.90% 46.91% +0.01%
==========================================
Files 99 99
Lines 3710 3717 +7
==========================================
+ Hits 1740 1744 +4
- Misses 1920 1922 +2
- Partials 50 51 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Also if I'm not mistaken, #510 is also trying to solve the same underlying issue - The fact Twitter embeds don't work. I don't know if there has been a discussion whether we'd go that route or this route with OG tags. |
I would consider falling back to OG tags by default to be desirable despite the other PR, since the API used there is unofficial. |
I really don't like how this changes twitter/resolver.go, but I haven't managed to figure out a better way to check if a request matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
Appends "(bot)" to User-Agent so that the default resolver can fetch OpenGraph tags for twitter links.
I don't like how this identifies twitter links, but it's the best I could come up with on the spot.
Note that the default resolver is only used if no Twitter token is specified in the config.
Closes #499