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
@@ -19,6 +19,5 @@
export class ApiConfiguration {
defaultVersion: string = "9";
activeVersions: string[] = ["6", "7", "8", "9"];
useFosscordEnhancements: boolean = true;
endpointPublic: string = "/api";
}
@@ -16,12 +16,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Snowflake } from "@fosscord/util";
import { Snowflake } from "@spacebar/util";
export class GeneralConfiguration {
instanceName: string = "Fosscord Instance";
instanceName: string = "Spacebar Instance";
instanceDescription: string | null =
"This is a Fosscord instance made in the pre-release days";
"This is a Spacebar instance made in the pre-release days";
frontPage: string | null = null;
tosPage: string | null = null;
correspondenceEmail: string | null = null;
+3 -3
View File
@@ -19,12 +19,12 @@
import { Region } from ".";
export class RegionConfiguration {
default: string = "fosscord";
default: string = "spacebar";
useDefaultAsOptimal: boolean = true;
available: Region[] = [
{
id: "fosscord",
name: "Fosscord",
id: "spacebar",
name: "spacebar",
endpoint: "127.0.0.1:3004",
vip: false,
custom: false,
+1 -1
View File
@@ -100,7 +100,7 @@ export enum AuditLogEvents {
POLICY_CREATE = 140,
POLICY_UPDATE = 141,
POLICY_DELETE = 142,
MESSAGE_BLOCKED_BY_POLICIES = 143, // in fosscord, blocked messages are stealth-dropped
MESSAGE_BLOCKED_BY_POLICIES = 143, // in spacebar, blocked messages are stealth-dropped
// instance policies affecting the guild
GUILD_AFFECTED_BY_POLICIES = 216,
// message moves
+1 -1
View File
@@ -59,5 +59,5 @@ export class Emoji extends BaseClass {
roles: string[]; // roles this emoji is whitelisted to (new discord feature?)
@Column({ type: "simple-array", nullable: true })
groups: string[]; // user groups this emoji is whitelisted to (Fosscord extension)
groups: string[]; // user groups this emoji is whitelisted to (Spacebar extension)
}
+2 -2
View File
@@ -319,7 +319,7 @@ export class Guild extends BaseClass {
const guild = await Guild.create({
id: guild_id,
name: body.name || "Fosscord",
name: body.name || "Spacebar",
icon: await handleFile(`/icons/${guild_id}`, body.icon as string),
owner_id: body.owner_id, // TODO: need to figure out a way for ownerless guilds and multiply-owned guilds
presence_count: 0,
@@ -346,7 +346,7 @@ export class Guild extends BaseClass {
color: 0,
hoist: false,
managed: false,
// NB: in Fosscord, every role will be non-managed, as we use user-groups instead of roles for managed groups
// NB: in Spacebar, every role will be non-managed, as we use user-groups instead of roles for managed groups
mentionable: false,
name: "@everyone",
permissions: String("2251804225"),
+1 -1
View File
@@ -86,7 +86,7 @@ export class Invite extends BaseClassWithoutId {
@ManyToOne(() => User, {
onDelete: "CASCADE",
})
target_user?: string; // could be used for "User specific invites" https://github.com/fosscord/fosscord/issues/62
target_user?: string; // could be used for "User specific invites" https://github.com/spacebarchat/server/issues/326
@Column({ nullable: true })
target_user_type?: number;
+1 -1
View File
@@ -40,7 +40,7 @@ import {
UserSettings,
IReadyGuildDTO,
ReadState,
} from "@fosscord/util";
} from "@spacebar/util";
export interface Event {
guild_id?: string;
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Activity, Status } from "@fosscord/util";
import { Activity, Status } from "@spacebar/util";
export const ActivitySchema = {
$afk: Boolean,
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ChannelPermissionOverwriteType, ChannelType } from "@fosscord/util";
import { ChannelPermissionOverwriteType, ChannelType } from "@spacebar/util";
export interface ChannelModifySchema {
/**
@@ -16,6 +16,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ChannelPermissionOverwrite } from "@fosscord/util";
import { ChannelPermissionOverwrite } from "@spacebar/util";
export type ChannelPermissionOverwriteSchema = ChannelPermissionOverwrite;
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { GuildCreateSchema } from "@fosscord/util";
import { GuildCreateSchema } from "@spacebar/util";
export interface GuildUpdateSchema
extends Omit<GuildCreateSchema, "channels" | "name"> {
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ActivitySchema } from "@fosscord/util";
import { ActivitySchema } from "@spacebar/util";
// TODO: Need a way to allow camalCase and pascal_case without just duplicating the schema
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Embed } from "@fosscord/util";
import { Embed } from "@spacebar/util";
type Attachment = {
id: string;
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { RelationshipType } from "@fosscord/util";
import { RelationshipType } from "@spacebar/util";
export interface RelationshipPutSchema {
type?: RelationshipType;
+1 -1
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { UserGuildSettings, ChannelOverride } from "@fosscord/util";
import { UserGuildSettings, ChannelOverride } from "@spacebar/util";
// This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema
export interface UserGuildSettingsSchema
+1 -1
View File
@@ -16,6 +16,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { UserSettings } from "@fosscord/util";
import { UserSettings } from "@spacebar/util";
export type UserSettingsSchema = Omit<Partial<UserSettings>, "index">;
+2 -2
View File
@@ -78,8 +78,8 @@ async function download(url: string, dir: string) {
const agent = new ProxyAgent();
const response = await fetch(url, { agent });
const buffer = await response.buffer();
const tempDir = await fs.mkdtemp("fosscord");
await fs.writeFile(path.join(tempDir, "Fosscord.zip"), buffer);
const tempDir = await fs.mkdtemp("spacebar");
await fs.writeFile(path.join(tempDir, "Spacebar.zip"), buffer);
} catch (error) {
console.error(`[Auto Update] download failed`, error);
}
+5 -5
View File
@@ -1001,9 +1001,9 @@ export const DiscordApiErrors = {
};
/**
* An error encountered while performing an API request (Fosscord only). Here are the potential errors:
* An error encountered while performing an API request (Spacebar only). Here are the potential errors:
*/
export const FosscordApiErrors = {
export const SpacebarApiErrors = {
MANUALLY_TRIGGERED_ERROR: new ApiError(
"This is an artificial error",
1,
@@ -1101,7 +1101,7 @@ export const FosscordApiErrors = {
* The value set for a guild's default message notifications, e.g. `ALL`. Here are the available types:
* * ALL
* * MENTIONS
* * MUTED (Fosscord extension)
* * MUTED (Spacebar extension)
* @typedef {string} DefaultMessageNotifications
*/
export const DefaultMessageNotifications = ["ALL", "MENTIONS", "MUTED"];
@@ -1110,7 +1110,7 @@ export const DefaultMessageNotifications = ["ALL", "MENTIONS", "MUTED"];
* The value set for a team members's membership state:
* * INVITED
* * ACCEPTED
* * INSERTED (Fosscord extension)
* * INSERTED (Spacebar extension)
* @typedef {string} MembershipStates
*/
export const MembershipStates = ["INSERTED", "INVITED", "ACCEPTED"];
@@ -1119,7 +1119,7 @@ export const MembershipStates = ["INSERTED", "INVITED", "ACCEPTED"];
* The value set for a webhook's type:
* * Incoming
* * Channel Follower
* * Custom (Fosscord extension)
* * Custom (Spacebar extension)
* @typedef {string} WebhookTypes
*/
export const WebhookTypes = ["Custom", "Incoming", "Channel Follower"];
+1 -1
View File
@@ -83,7 +83,7 @@ export async function initDatabase(): Promise<DataSource> {
"[Database]" +
red(
` We don't have migrations for DB type '${DatabaseType}'` +
` To ignore, set DB_SYNC=true in your env. https://docs.fosscord.com/setup/server/configuration/env/`,
` To ignore, set DB_SYNC=true in your env. https://docs.spacebar.chat/setup/server/configuration/env/`,
),
);
process.exit();
+2 -2
View File
@@ -9,9 +9,9 @@ export class MessageFlags extends BitField {
CROSSPOSTED: BigInt(1) << BigInt(0),
IS_CROSSPOST: BigInt(1) << BigInt(1),
SUPPRESS_EMBEDS: BigInt(1) << BigInt(2),
// SOURCE_MESSAGE_DELETED: BigInt(1) << BigInt(3), // fosscord will delete them from destination too, making this redundant
// SOURCE_MESSAGE_DELETED: BigInt(1) << BigInt(3), // spacebar will delete them from destination too, making this redundant
URGENT: BigInt(1) << BigInt(4),
// HAS_THREAD: BigInt(1) << BigInt(5) // does not apply to fosscord due to infrastructural differences
// HAS_THREAD: BigInt(1) << BigInt(5) // does not apply to spacebar due to infrastructural differences
PRIVATE_ROUTE: BigInt(1) << BigInt(6), // it that has been routed to only some of the users that can see the channel
INTERACTION_WAIT: BigInt(1) << BigInt(7), // discord.com calls this LOADING
// FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: BigInt(1) << BigInt(8)
+1 -1
View File
@@ -69,7 +69,7 @@ export function checkToken(
token = token.replace("Bot ", "");
token = token.replace("Bearer ", "");
/**
in fosscord, even with instances that have bot distinction; we won't enforce "Bot" prefix,
in spacebar, even with instances that have bot distinction; we won't enforce "Bot" prefix,
as we don't really have separate pathways for bots
**/
+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 nodemailer from "nodemailer";
export default async function () {
+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 nodemailer from "nodemailer";
export default async function () {
+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 nodemailer from "nodemailer";
export default async function () {
+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 nodemailer from "nodemailer";
export default async function () {