[#11382] Status Updates: Add URL unfurling
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
72591f576d
commit
6d104d60e2
|
@ -88,10 +88,11 @@
|
|||
[ask-user? [:link-preview/link-preview-request-enabled]
|
||||
whitelist [:link-preview/whitelist]
|
||||
enabled-sites [:link-preview/enabled-sites]]
|
||||
(when links
|
||||
(let [link-info (previewable-link links whitelist enabled-sites)
|
||||
{:keys [link whitelisted enabled]} link-info]
|
||||
(when (and link whitelisted)
|
||||
(if enabled
|
||||
[link-preview-loader link outgoing]
|
||||
(when ask-user?
|
||||
[link-preview-enable-request]))))))
|
||||
[link-preview-enable-request])))))))
|
|
@ -16,7 +16,8 @@
|
|||
[status-im.ui.screens.chat.photos :as photos]
|
||||
[status-im.ui.components.tabs :as tabs]
|
||||
[status-im.utils.contenthash :as contenthash]
|
||||
[status-im.multiaccounts.core :as multiaccounts]))
|
||||
[status-im.multiaccounts.core :as multiaccounts]
|
||||
[status-im.ui.screens.chat.message.link-preview :as link-preview]))
|
||||
|
||||
(defonce messages-list-ref (atom nil))
|
||||
(def image-max-dimension 260)
|
||||
|
@ -84,7 +85,9 @@
|
|||
(datetime/time-ago (datetime/to-date timestamp))]]
|
||||
(if (= content-type constants/content-type-image)
|
||||
[image-message message]
|
||||
[message/render-parsed-text (assoc message :outgoing false) (:parsed-text content)])]]])
|
||||
[react/view
|
||||
[message/render-parsed-text (assoc message :outgoing false) (:parsed-text content)]
|
||||
[link-preview/link-preview-wrapper (:links content) outgoing]])]]])
|
||||
|
||||
(defn render-message [timeline? account]
|
||||
(fn [{:keys [type] :as message} idx]
|
||||
|
|
Loading…
Reference in New Issue