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/util | |
parent | Revert "Merge pull request #1008 from spacebarchat/dev/samuel" (diff) | |
download | server-095cbf7b2036bc35d9c3eabbdec8a5c6dfd67242.tar.xz |
Remove ALL fosscord mentions
Diffstat (limited to 'src/util')
26 files changed, 36 insertions, 37 deletions
diff --git a/src/util/config/types/ApiConfiguration.ts b/src/util/config/types/ApiConfiguration.ts index 03717dcf..4d61521a 100644 --- a/src/util/config/types/ApiConfiguration.ts +++ b/src/util/config/types/ApiConfiguration.ts @@ -19,6 +19,5 @@ export class ApiConfiguration { defaultVersion: string = "9"; activeVersions: string[] = ["6", "7", "8", "9"]; - useFosscordEnhancements: boolean = true; endpointPublic: string = "/api"; } diff --git a/src/util/config/types/GeneralConfiguration.ts b/src/util/config/types/GeneralConfiguration.ts index 53cfea5f..c20fe9a7 100644 --- a/src/util/config/types/GeneralConfiguration.ts +++ b/src/util/config/types/GeneralConfiguration.ts @@ -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; diff --git a/src/util/config/types/RegionConfiguration.ts b/src/util/config/types/RegionConfiguration.ts index 2d9ff502..8cd11fc0 100644 --- a/src/util/config/types/RegionConfiguration.ts +++ b/src/util/config/types/RegionConfiguration.ts @@ -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, diff --git a/src/util/entities/AuditLog.ts b/src/util/entities/AuditLog.ts index e47f92fb..b375f771 100644 --- a/src/util/entities/AuditLog.ts +++ b/src/util/entities/AuditLog.ts @@ -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 diff --git a/src/util/entities/Emoji.ts b/src/util/entities/Emoji.ts index f1bf2d59..0bc2f423 100644 --- a/src/util/entities/Emoji.ts +++ b/src/util/entities/Emoji.ts @@ -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) } diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts index b1693838..e8454986 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts @@ -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"), diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts index e5f2e82c..3019709f 100644 --- a/src/util/entities/Invite.ts +++ b/src/util/entities/Invite.ts @@ -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; diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts index 6913a815..3a0eadc5 100644 --- a/src/util/interfaces/Event.ts +++ b/src/util/interfaces/Event.ts @@ -40,7 +40,7 @@ import { UserSettings, IReadyGuildDTO, ReadState, -} from "@fosscord/util"; +} from "@spacebar/util"; export interface Event { guild_id?: string; diff --git a/src/util/schemas/ActivitySchema.ts b/src/util/schemas/ActivitySchema.ts index f1a48f44..f168f967 100644 --- a/src/util/schemas/ActivitySchema.ts +++ b/src/util/schemas/ActivitySchema.ts @@ -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, diff --git a/src/util/schemas/ChannelModifySchema.ts b/src/util/schemas/ChannelModifySchema.ts index 2f6eb7ae..088ac459 100644 --- a/src/util/schemas/ChannelModifySchema.ts +++ b/src/util/schemas/ChannelModifySchema.ts @@ -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 { /** diff --git a/src/util/schemas/ChannelPermissionOverwriteSchema.ts b/src/util/schemas/ChannelPermissionOverwriteSchema.ts index 18602300..6e8b3402 100644 --- a/src/util/schemas/ChannelPermissionOverwriteSchema.ts +++ b/src/util/schemas/ChannelPermissionOverwriteSchema.ts @@ -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; diff --git a/src/util/schemas/GuildUpdateSchema.ts b/src/util/schemas/GuildUpdateSchema.ts index 8fb4127e..19316380 100644 --- a/src/util/schemas/GuildUpdateSchema.ts +++ b/src/util/schemas/GuildUpdateSchema.ts @@ -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"> { diff --git a/src/util/schemas/IdentifySchema.ts b/src/util/schemas/IdentifySchema.ts index d2b716ea..fb48c2a4 100644 --- a/src/util/schemas/IdentifySchema.ts +++ b/src/util/schemas/IdentifySchema.ts @@ -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 diff --git a/src/util/schemas/MessageCreateSchema.ts b/src/util/schemas/MessageCreateSchema.ts index 5b925457..45cd735e 100644 --- a/src/util/schemas/MessageCreateSchema.ts +++ b/src/util/schemas/MessageCreateSchema.ts @@ -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; diff --git a/src/util/schemas/RelationshipPutSchema.ts b/src/util/schemas/RelationshipPutSchema.ts index 33f827eb..36d9877d 100644 --- a/src/util/schemas/RelationshipPutSchema.ts +++ b/src/util/schemas/RelationshipPutSchema.ts @@ -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; diff --git a/src/util/schemas/UserGuildSettingsSchema.ts b/src/util/schemas/UserGuildSettingsSchema.ts index 967e29de..c295f767 100644 --- a/src/util/schemas/UserGuildSettingsSchema.ts +++ b/src/util/schemas/UserGuildSettingsSchema.ts @@ -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 diff --git a/src/util/schemas/UserSettingsSchema.ts b/src/util/schemas/UserSettingsSchema.ts index bad34700..0d23e757 100644 --- a/src/util/schemas/UserSettingsSchema.ts +++ b/src/util/schemas/UserSettingsSchema.ts @@ -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">; diff --git a/src/util/util/AutoUpdate.ts b/src/util/util/AutoUpdate.ts index 8365d9ae..1f90a41e 100644 --- a/src/util/util/AutoUpdate.ts +++ b/src/util/util/AutoUpdate.ts @@ -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); } diff --git a/src/util/util/Constants.ts b/src/util/util/Constants.ts index 0d1d721e..d4adb54e 100644 --- a/src/util/util/Constants.ts +++ b/src/util/util/Constants.ts @@ -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"]; diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts index e23bb895..a6b24b3e 100644 --- a/src/util/util/Database.ts +++ b/src/util/util/Database.ts @@ -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(); diff --git a/src/util/util/MessageFlags.ts b/src/util/util/MessageFlags.ts index 35ba9e2a..b2ea41d0 100644 --- a/src/util/util/MessageFlags.ts +++ b/src/util/util/MessageFlags.ts @@ -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) diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts index 50e63c5f..90310176 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -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 **/ diff --git a/src/util/util/email/transports/MailGun.ts b/src/util/util/email/transports/MailGun.ts index f6529518..badc9880 100644 --- a/src/util/util/email/transports/MailGun.ts +++ b/src/util/util/email/transports/MailGun.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 nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/MailJet.ts b/src/util/util/email/transports/MailJet.ts index 336fa97a..69be7acf 100644 --- a/src/util/util/email/transports/MailJet.ts +++ b/src/util/util/email/transports/MailJet.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 nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/SMTP.ts b/src/util/util/email/transports/SMTP.ts index a6e06e52..5b43a870 100644 --- a/src/util/util/email/transports/SMTP.ts +++ b/src/util/util/email/transports/SMTP.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 nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/SendGrid.ts b/src/util/util/email/transports/SendGrid.ts index 1d2e366c..a863d3ec 100644 --- a/src/util/util/email/transports/SendGrid.ts +++ b/src/util/util/email/transports/SendGrid.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 nodemailer from "nodemailer"; export default async function () { |