diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-05 16:10:24 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-05 16:10:24 +1100 |
commit | b2aac3eed7746811dde23b394470f306d86218b1 (patch) | |
tree | 41a7b1a38f5abd7d8734dcb96c8157167f64d4f0 /src | |
parent | Check nonce in Message send (diff) | |
download | server-b2aac3eed7746811dde23b394470f306d86218b1.tar.xz |
embed fail
Diffstat (limited to 'src')
-rw-r--r-- | src/api/util/handlers/Message.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts index 68fd37de..37269185 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts @@ -194,7 +194,7 @@ export async function postHandleMessage(message: Message) { for (const link of links) { const url = new URL(link); - const cached = await EmbedCache.findOne({ where: { url: `${url.host}${url.pathname}` } }); + const cached = await EmbedCache.findOne({ where: { url: link } }); if (cached) { data.embeds.push(cached.embed); continue; @@ -212,7 +212,7 @@ export async function postHandleMessage(message: Message) { for (var embed of res) { var cache = EmbedCache.create({ - url: `${url.host}${url.pathname}`, + url: link, embed: embed, }); cachePromises.push(cache.save()); |