mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-17 15:55:23 +08:00
preview: fix undefined domain for twitter and color with luma
Change-Id: I28a5d02881b9b5eb57ad6efa646dd1c5a3327856 GitLab: #670
This commit is contained in:
@@ -24,13 +24,13 @@ function getPreviewInfo(messageId, url) {
|
||||
var doc = parser.parseFromString(html, "text/html")
|
||||
if (!url.includes("twitter.com")){
|
||||
title = getTitle(doc)
|
||||
image = getImage(doc, url)
|
||||
description = getDescription(doc)
|
||||
var domain = (new URL(url))
|
||||
domain = (domain.hostname).replace("www.", "")
|
||||
} else {
|
||||
title = "Twitter. It's what's happening."
|
||||
}
|
||||
image = getImage(doc, url)
|
||||
description = getDescription(doc)
|
||||
var domain = (new URL(url))
|
||||
domain = (domain.hostname).replace("www.", "")
|
||||
|
||||
window.jsbridge.emitInfoReady(messageId, {
|
||||
'title': title,
|
||||
|
||||
Reference in New Issue
Block a user