From c2f3c3bfb8658953f7431742c6713374cb9451f2 Mon Sep 17 00:00:00 2001 From: pajlada Date: Sun, 10 Sep 2023 22:16:16 +0200 Subject: [PATCH] Support x.com for tweets (#527) --- CHANGELOG.md | 1 + internal/resolvers/twitter/resolver.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 653fbb8d..9d14083d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Breaking: Remove the `/twitchemotes/` endpoints. See [issue 332](https://github.com/Chatterino/api/issues/332) for more information. (#465) - Minor: Use Twitter OG tags if no Twitter credentials are configured. (#522) +- Minor: Support `x.com` for tweets. (#527) - Fix: We do some more YouTube video ID parsing to ensure broken links (such as `youtube.com/watch?v=foobar?feature=share`) still return the actual video ID, since this is how the browser operates. (#488) - Dev: Document the `log-development` setting. (#491) - Dev: Document the `log-level` setting. (#490) diff --git a/internal/resolvers/twitter/resolver.go b/internal/resolvers/twitter/resolver.go index 050bf97c..a94d9e9b 100644 --- a/internal/resolvers/twitter/resolver.go +++ b/internal/resolvers/twitter/resolver.go @@ -19,7 +19,7 @@ type TwitterResolver struct { } func Check(ctx context.Context, url *url.URL) (context.Context, bool) { - if !utils.IsSubdomainOf(url, "twitter.com") { + if !utils.IsSubdomainOf(url, "twitter.com", "x.com") { return ctx, false }