From a13be6ccac48e72d570266e5ff21c84e8ab3386e Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 10 Sep 2023 22:07:56 +0200 Subject: [PATCH 1/2] Support x.com for tweets --- internal/resolvers/twitter/resolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } From 1ad0a22a315368198afe8e6c45ae29f22c4c1825 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 10 Sep 2023 22:08:31 +0200 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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)