fedimbed: Shocking! The most annoying person you know finally makes you implement a permission check.

This commit is contained in:
Cynthia Foxwell 2025-10-17 21:14:50 -06:00
parent b66568e546
commit f6f3f2654e
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -1613,6 +1613,8 @@ events.add("messageCreate", "fedimbed", async function (msg) {
if (!((await hasFlag(msg.guildID, "fedimbed")) || (await hasFlag(msg.guildID, "bskyEmbeds")))) return;
if (!msg.content || msg.content == "") return;
if (!msg.member.permissions.has("embedLinks")) return;
if (URLS_REGEX.test(msg.content)) {
const urls = msg.content.match(URLS_REGEX);
for (let url of urls) {