diff --git a/protocol/urls/urls.go b/protocol/urls/urls.go index a314cd934..3c89029d0 100644 --- a/protocol/urls/urls.go +++ b/protocol/urls/urls.go @@ -69,8 +69,8 @@ func LinkPreviewWhitelist() []Site { ImageSite: true, }, Site{ - Title: "GIPHY GIFs Short URLS", - Address: "gph.se", + Title: "GIPHY GIFs shortener", + Address: "gph.is", ImageSite: true, }, Site{ @@ -176,7 +176,7 @@ func GetGiphyPreviewData(link string) (previewData LinkPreviewData, err error) { return previewData, nil } -// Giphy has a shortener service called gph.se, the oembed service doesn't work with shortened urls, +// Giphy has a shortener service called gph.is, the oembed service doesn't work with shortened urls, // so we need to fetch the long url first func GetGiphyLongURL(shortURL string) (longURL string, err error) { // nolint: gosec @@ -250,7 +250,7 @@ func GetLinkPreviewData(link string) (previewData LinkPreviewData, err error) { return GetGithubPreviewData(link) case "giphy.com": return GetGiphyPreviewData(link) - case "gph.se": + case "gph.is": return GetGiphyShortURLPreviewData(link) case "tenor.com": return GetTenorPreviewData(link) diff --git a/protocol/urls/urls_test.go b/protocol/urls/urls_test.go index 621f09fb0..ad9c949c1 100644 --- a/protocol/urls/urls_test.go +++ b/protocol/urls/urls_test.go @@ -74,7 +74,7 @@ func TestGetGiphyLongURL(t *testing.T) { _, err := GetGiphyLongURL("http://this-giphy-site-doesn-not-exist.se/bogus-url") require.Error(t, err) - _, err = GetGiphyLongURL("http://gph.se/bogus-url-but-correct-domain") + _, err = GetGiphyLongURL("http://gph.is/bogus-url-but-correct-domain") require.Error(t, err) }