summary refs log tree commit diff
path: root/api/src/util
diff options
context:
space:
mode:
authorHayden Young <hi@hbjy.dev>2021-10-15 09:42:31 +0000
committerGitHub <noreply@github.com>2021-10-15 09:42:31 +0000
commit892459a93879f9820f3672dece66f4ebdfc8701d (patch)
treeea2d14a706eb6e2e455ac23fe43e7343dee3f6be /api/src/util
parentfix: don't set location by default (diff)
parent:bug: fix migration + autojoin (diff)
downloadserver-892459a93879f9820f3672dece66f4ebdfc8701d.tar.xz
chore: merge master into cdn-s3
Diffstat (limited to 'api/src/util')
-rw-r--r--api/src/util/Instance.ts2
-rw-r--r--api/src/util/Message.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/api/src/util/Instance.ts b/api/src/util/Instance.ts

index a7b3205a..d1d9e1ab 100644 --- a/api/src/util/Instance.ts +++ b/api/src/util/Instance.ts
@@ -8,7 +8,7 @@ export async function initInstance() { // TODO: check if any current user is not part of autoJoinGuilds const { autoJoin } = Config.get().guild; - if (autoJoin.enabled && autoJoin.guilds?.length) { + if (autoJoin.enabled && !autoJoin.guilds?.length) { let guild = await Guild.findOne({}); if (!guild) guild = await Guild.createGuild({}); diff --git a/api/src/util/Message.ts b/api/src/util/Message.ts
index f8230124..40d96b42 100644 --- a/api/src/util/Message.ts +++ b/api/src/util/Message.ts
@@ -25,6 +25,7 @@ import cheerio from "cheerio"; import { MessageCreateSchema } from "../routes/channels/#channel_id/messages"; // TODO: check webhook, application, system author +// TODO: embed gifs/videos/images const LINK_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g;