diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-03-31 15:52:33 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-03-31 15:52:33 +1100 |
commit | 095cbf7b2036bc35d9c3eabbdec8a5c6dfd67242 (patch) | |
tree | 72bc2d6b975855c020e5dd9612a5113b4bf7c2e3 /src/api/util | |
parent | Revert "Merge pull request #1008 from spacebarchat/dev/samuel" (diff) | |
download | server-095cbf7b2036bc35d9c3eabbdec8a5c6dfd67242.tar.xz |
Remove ALL fosscord mentions
Diffstat (limited to '')
-rw-r--r-- | src/api/util/handlers/Instance.ts | 2 | ||||
-rw-r--r-- | src/api/util/handlers/Message.ts | 4 | ||||
-rw-r--r-- | src/api/util/handlers/Voice.ts | 2 | ||||
-rw-r--r-- | src/api/util/handlers/route.ts | 6 | ||||
-rw-r--r-- | src/api/util/utility/EmbedHandlers.ts | 6 | ||||
-rw-r--r-- | src/api/util/utility/RandomInviteID.ts | 2 | ||||
-rw-r--r-- | src/api/util/utility/String.ts | 2 | ||||
-rw-r--r-- | src/api/util/utility/captcha.ts | 4 | ||||
-rw-r--r-- | src/api/util/utility/ipAddress.ts | 2 | ||||
-rw-r--r-- | src/api/util/utility/passwordStrength.ts | 2 |
10 files changed, 16 insertions, 16 deletions
diff --git a/src/api/util/handlers/Instance.ts b/src/api/util/handlers/Instance.ts index bd9bf394..ccd56d92 100644 --- a/src/api/util/handlers/Instance.ts +++ b/src/api/util/handlers/Instance.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Session } from "@fosscord/util"; +import { Session } from "@spacebar/util"; export async function initInstance() { // TODO: clean up database and delete tombstone data diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts index 65dbcdfe..6172a3d0 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts @@ -41,10 +41,10 @@ import { Sticker, MessageCreateSchema, EmbedCache, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { In } from "typeorm"; -import { EmbedHandlers } from "@fosscord/api"; +import { EmbedHandlers } from "@spacebar/api"; import * as Sentry from "@sentry/node"; const allow_empty = false; // TODO: check webhook, application, system author, stickers diff --git a/src/api/util/handlers/Voice.ts b/src/api/util/handlers/Voice.ts index 0880ab98..db06bd33 100644 --- a/src/api/util/handlers/Voice.ts +++ b/src/api/util/handlers/Voice.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { distanceBetweenLocations, IPAnalysis } from "../utility/ipAddress"; export async function getVoiceRegions(ipAddress: string, vip: boolean) { diff --git a/src/api/util/handlers/route.ts b/src/api/util/handlers/route.ts index b0bc3af7..604df4e9 100644 --- a/src/api/util/handlers/route.ts +++ b/src/api/util/handlers/route.ts @@ -21,7 +21,7 @@ import { DiscordApiErrors, EVENT, FieldErrors, - FosscordApiErrors, + SpacebarApiErrors, getPermission, getRights, normalizeBody, @@ -29,7 +29,7 @@ import { Permissions, RightResolvable, Rights, -} from "@fosscord/util"; +} from "@spacebar/util"; import { NextFunction, Request, Response } from "express"; import { AnyValidateFunction } from "ajv/dist/core"; @@ -91,7 +91,7 @@ export function route(opts: RouteOptions) { req.rights = await getRights(req.user_id); if (!req.rights || !req.rights.has(required)) { - throw FosscordApiErrors.MISSING_RIGHTS.withParams( + throw SpacebarApiErrors.MISSING_RIGHTS.withParams( opts.right as string, ); } diff --git a/src/api/util/utility/EmbedHandlers.ts b/src/api/util/utility/EmbedHandlers.ts index 1e84e31a..15e3f67f 100644 --- a/src/api/util/utility/EmbedHandlers.ts +++ b/src/api/util/utility/EmbedHandlers.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Config, Embed, EmbedType } from "@fosscord/util"; +import { Config, Embed, EmbedType } from "@spacebar/util"; import fetch, { RequestInit } from "node-fetch"; import * as cheerio from "cheerio"; import probe from "probe-image-size"; @@ -28,7 +28,7 @@ export const DEFAULT_FETCH_OPTIONS: RequestInit = { follow: 1, headers: { "user-agent": - "Mozilla/5.0 (compatible; Fosscord/1.0; +https://github.com/fosscord/fosscord)", + "Mozilla/5.0 (compatible; Spacebar/1.0; +https://github.com/spacebarchat/server)", }, // size: 1024 * 1024 * 5, // grabbed from config later compress: true, @@ -67,7 +67,7 @@ export const getProxyUrl = ( console.log( "[Embeds]", yellow( - "Imagor has not been set up correctly. https://docs.fosscord.com/setup/server/configuration/imagor/", + "Imagor has not been set up correctly. https://docs.spacebar.chat/setup/server/configuration/imagor/", ), ); } diff --git a/src/api/util/utility/RandomInviteID.ts b/src/api/util/utility/RandomInviteID.ts index e3eda606..926750d3 100644 --- a/src/api/util/utility/RandomInviteID.ts +++ b/src/api/util/utility/RandomInviteID.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Snowflake } from "@fosscord/util"; +import { Snowflake } from "@spacebar/util"; import crypto from "crypto"; // TODO: 'random'? seriously? who named this? diff --git a/src/api/util/utility/String.ts b/src/api/util/utility/String.ts index 7bc752f5..eef69e39 100644 --- a/src/api/util/utility/String.ts +++ b/src/api/util/utility/String.ts @@ -18,7 +18,7 @@ import { Request } from "express"; import { ntob } from "./Base64"; -import { FieldErrors } from "@fosscord/util"; +import { FieldErrors } from "@spacebar/util"; export function checkLength( str: string, diff --git a/src/api/util/utility/captcha.ts b/src/api/util/utility/captcha.ts index 28dba44b..db1b7957 100644 --- a/src/api/util/utility/captcha.ts +++ b/src/api/util/utility/captcha.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import fetch from "node-fetch"; export interface hcaptchaResponse { @@ -49,7 +49,7 @@ export async function verifyCaptcha(response: string, ip?: string) { if (!service || !secret || !sitekey) throw new Error( - "CAPTCHA is not configured correctly. https://docs.fosscord.com/setup/server/security/captcha/", + "CAPTCHA is not configured correctly. https://docs.spacebar.chat/setup/server/security/captcha/", ); const res = await fetch(verifyEndpoints[service], { diff --git a/src/api/util/utility/ipAddress.ts b/src/api/util/utility/ipAddress.ts index 4ae316fa..172e9604 100644 --- a/src/api/util/utility/ipAddress.ts +++ b/src/api/util/utility/ipAddress.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { Request } from "express"; // use ipdata package instead of simple fetch because of integrated caching import fetch from "node-fetch"; diff --git a/src/api/util/utility/passwordStrength.ts b/src/api/util/utility/passwordStrength.ts index 4f3914c5..fd627fbf 100644 --- a/src/api/util/utility/passwordStrength.ts +++ b/src/api/util/utility/passwordStrength.ts @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import "missing-native-js-functions"; const reNUMBER = /[0-9]/g; |