mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 12:22:50 +02:00
Add setting for d->m URL previews
This commit is contained in:
parent
efd7cb3fd4
commit
6b919d2a82
6 changed files with 51 additions and 2 deletions
|
@ -597,7 +597,12 @@ async function messageToEvent(message, guild, options = {}, di) {
|
|||
}
|
||||
|
||||
// Then embeds
|
||||
const urlPreviewEnabled = select("guild_space", "url_preview", {guild_id: guild?.id}).pluck().get() ?? 1
|
||||
for (const embed of message.embeds || []) {
|
||||
if (!urlPreviewEnabled && !message.author?.bot) {
|
||||
continue // show embeds for everyone if enabled, or bot users only if disabled (bots often send content in embeds)
|
||||
}
|
||||
|
||||
if (embed.type === "image") {
|
||||
continue // Matrix's own URL previews are fine for images.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue