aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/utils
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-03-13 13:18:59 +0300
committerGravatar Vitaly Takmazov2024-03-13 13:18:59 +0300
commita78b3e51745fb5530d3b45db28abe862376e09ab (patch)
treeb782d1a36a37265c06710de0b07d03e6d049a42a /vnext/src/utils
parentd3eb799ea302b520ef253c53874a6fafe508409e (diff)
embed.js: do not embed links when media is present
Diffstat (limited to 'vnext/src/utils')
-rw-r--r--vnext/src/utils/embed.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/vnext/src/utils/embed.js b/vnext/src/utils/embed.js
index 4501168b..59290227 100644
--- a/vnext/src/utils/embed.js
+++ b/vnext/src/utils/embed.js
@@ -395,7 +395,10 @@ export function embedAll() {
let beforeNodeSelector = '.msg-txt + *'
let allLinksSelector = '.msg-txt a'
Array.from(document.querySelectorAll('#content .msg-cont')).forEach(msg => {
- embedLinksToX(msg, beforeNodeSelector, allLinksSelector)
+ let hasMedia = msg.querySelector('.msg-media') || msg.querySelector('.ir')
+ if (!hasMedia) {
+ embedLinksToX(msg, beforeNodeSelector, allLinksSelector)
+ }
})
}
/**