mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
embed fail
This commit is contained in:
parent
ca9d09bb22
commit
b2aac3eed7
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user