Comment out Medium unfurling (#2193)
This commit is contained in:
parent
27f5ad23cf
commit
9ef4971fe1
|
@ -99,11 +99,13 @@ func LinkPreviewWhitelist() []Site {
|
||||||
Address: "github.com",
|
Address: "github.com",
|
||||||
ImageSite: false,
|
ImageSite: false,
|
||||||
},
|
},
|
||||||
Site{
|
// Medium unfurling is failing - https://github.com/status-im/status-go/issues/2192
|
||||||
Title: "Medium",
|
//
|
||||||
Address: "medium.com",
|
// Site{
|
||||||
ImageSite: false,
|
// Title: "Medium",
|
||||||
},
|
// Address: "medium.com",
|
||||||
|
// ImageSite: false,
|
||||||
|
// },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +268,7 @@ func GetLinkPreviewData(link string) (previewData LinkPreviewData, err error) {
|
||||||
switch hostname {
|
switch hostname {
|
||||||
case "youtube.com", "youtu.be", "www.youtube.com":
|
case "youtube.com", "youtu.be", "www.youtube.com":
|
||||||
return GetYoutubePreviewData(link)
|
return GetYoutubePreviewData(link)
|
||||||
case "github.com", "our.status.im", "medium.com":
|
case "github.com", "our.status.im":
|
||||||
return GetGenericLinkPreviewData(link)
|
return GetGenericLinkPreviewData(link)
|
||||||
case "giphy.com", "media.giphy.com":
|
case "giphy.com", "media.giphy.com":
|
||||||
return GetGiphyPreviewData(link)
|
return GetGiphyPreviewData(link)
|
||||||
|
|
|
@ -135,17 +135,19 @@ func TestStatusLinkPreviewData(t *testing.T) {
|
||||||
require.Equal(t, statusSecurityAudit.ThumbnailURL, previewData.ThumbnailURL)
|
require.Equal(t, statusSecurityAudit.ThumbnailURL, previewData.ThumbnailURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMediumLinkPreviewData(t *testing.T) {
|
// Medium unfurling is failing - https://github.com/status-im/status-go/issues/2192
|
||||||
|
//
|
||||||
|
// func TestMediumLinkPreviewData(t *testing.T) {
|
||||||
|
|
||||||
statusSecurityAudit := LinkPreviewData{
|
// statusSecurityAudit := LinkPreviewData{
|
||||||
Site: "Medium",
|
// Site: "Medium",
|
||||||
Title: "A Look at the Status.im ICO Token Distribution",
|
// Title: "A Look at the Status.im ICO Token Distribution",
|
||||||
ThumbnailURL: "https://miro.medium.com/max/700/1*Smc0y_TOL1XsofS1wxa3rg.jpeg",
|
// ThumbnailURL: "https://miro.medium.com/max/700/1*Smc0y_TOL1XsofS1wxa3rg.jpeg",
|
||||||
}
|
// }
|
||||||
|
|
||||||
previewData, err := GetLinkPreviewData("https://medium.com/the-bitcoin-podcast-blog/a-look-at-the-status-im-ico-token-distribution-f5bcf7f00907")
|
// previewData, err := GetLinkPreviewData("https://medium.com/the-bitcoin-podcast-blog/a-look-at-the-status-im-ico-token-distribution-f5bcf7f00907")
|
||||||
require.NoError(t, err)
|
// require.NoError(t, err)
|
||||||
require.Equal(t, statusSecurityAudit.Site, previewData.Site)
|
// require.Equal(t, statusSecurityAudit.Site, previewData.Site)
|
||||||
require.Equal(t, statusSecurityAudit.Title, previewData.Title)
|
// require.Equal(t, statusSecurityAudit.Title, previewData.Title)
|
||||||
require.Equal(t, statusSecurityAudit.ThumbnailURL, previewData.ThumbnailURL)
|
// require.Equal(t, statusSecurityAudit.ThumbnailURL, previewData.ThumbnailURL)
|
||||||
}
|
// }
|
||||||
|
|
Loading…
Reference in New Issue