Remove ALL fosscord mentions

This commit is contained in:
Madeline
2023-03-31 15:52:33 +11:00
parent 698ad90d3e
commit 095cbf7b20
236 changed files with 441 additions and 429 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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) {
+3 -3
View File
@@ -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,
);
}
+3 -3
View File
@@ -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/",
),
);
}
+1 -1
View File
@@ -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?
+1 -1
View File
@@ -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,
+2 -2
View File
@@ -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], {
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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;