From 23812aaeb557783d1a1df606084b0936428d9cb6 Mon Sep 17 00:00:00 2001 From: nonamethanks Date: Wed, 8 Apr 2020 13:38:02 +0200 Subject: [PATCH] Post#normalized_source: Normalize more twitter urls --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 79a87db16..fc9083f20 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -337,7 +337,7 @@ class Post < ApplicationRecord end case source - when %r{\Ahttps?://twitter.com/[^/]+/status/(\d+)\z}i + when %r{\Ahttps?://(?:mobile\.)?twitter.com/[^/]+/status/(\d+)(?:/(?:photo/\d)?|\?s=\d+)?\z}i "https://twitter.com/i/web/status/#{$1}" when %r{\Ahttps?://lohas\.nicoseiga\.jp/priv/(\d+)\?e=\d+&h=[a-f0-9]+}i,