mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-03 00:04:34 +00:00
Remove ALL fosscord mentions
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
initDatabase,
|
||||
initEvent,
|
||||
Sentry,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import ws from "ws";
|
||||
import { Connection } from "./events/Connection";
|
||||
import http from "http";
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import {
|
||||
emitEvent,
|
||||
PresenceUpdateEvent,
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
Session,
|
||||
SessionsReplace,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
|
||||
export async function Close(this: WebSocket, code: number, reason: Buffer) {
|
||||
console.log("[WebSocket] closed", code, reason.toString());
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
import WS from "ws";
|
||||
import { genSessionId, WebSocket } from "@fosscord/gateway";
|
||||
import { genSessionId, WebSocket } from "@spacebar/gateway";
|
||||
import { Send } from "../util/Send";
|
||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||
import { setHeartbeat } from "../util/Heartbeat";
|
||||
@@ -27,7 +27,7 @@ import { Close } from "./Close";
|
||||
import { Message } from "./Message";
|
||||
import { Deflate, Inflate } from "fast-zlib";
|
||||
import { URL } from "url";
|
||||
import { Config, ErlpackType } from "@fosscord/util";
|
||||
import { Config, ErlpackType } from "@spacebar/util";
|
||||
|
||||
let erlpack: ErlpackType | null = null;
|
||||
try {
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket, Payload, CLOSECODES, OPCODES } from "@fosscord/gateway";
|
||||
import { WebSocket, Payload, CLOSECODES, OPCODES } from "@spacebar/gateway";
|
||||
import OPCodeHandlers from "../opcodes";
|
||||
import { check } from "../opcodes/instanceOf";
|
||||
import WS from "ws";
|
||||
import { PayloadSchema, ErlpackType } from "@fosscord/util";
|
||||
import { PayloadSchema, ErlpackType } from "@spacebar/util";
|
||||
import * as Sentry from "@sentry/node";
|
||||
import BigIntJson from "json-bigint";
|
||||
import path from "path";
|
||||
|
||||
@@ -27,13 +27,13 @@ import {
|
||||
EVENTEnum,
|
||||
Relationship,
|
||||
RelationshipType,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { OPCODES } from "../util/Constants";
|
||||
import { Send } from "../util/Send";
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import "missing-native-js-functions";
|
||||
import { Channel as AMQChannel } from "amqplib";
|
||||
import { Recipient } from "@fosscord/util";
|
||||
import { Recipient } from "@spacebar/util";
|
||||
|
||||
// TODO: close connection on Invalidated Token
|
||||
// TODO: check intent
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import { setHeartbeat } from "../util/Heartbeat";
|
||||
import { Send } from "../util/Send";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
import { WebSocket, Payload } from "@spacebar/gateway";
|
||||
import {
|
||||
checkToken,
|
||||
Intents,
|
||||
@@ -43,14 +43,14 @@ import {
|
||||
ReadyGuildDTO,
|
||||
Guild,
|
||||
UserTokenData,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Send } from "../util/Send";
|
||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||
import { setupListener } from "../listener/listener";
|
||||
// import experiments from "./experiments.json";
|
||||
const experiments: unknown[] = [];
|
||||
import { check } from "./instanceOf";
|
||||
import { Recipient } from "@fosscord/util";
|
||||
import { Recipient } from "@spacebar/util";
|
||||
|
||||
// TODO: user sharding
|
||||
// TODO: check privileged intents, if defined in the config
|
||||
|
||||
@@ -26,14 +26,14 @@ import {
|
||||
LazyRequestSchema,
|
||||
User,
|
||||
Presence,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import {
|
||||
WebSocket,
|
||||
Payload,
|
||||
handlePresenceUpdate,
|
||||
OPCODES,
|
||||
Send,
|
||||
} from "@fosscord/gateway";
|
||||
} from "@spacebar/gateway";
|
||||
import { check } from "./instanceOf";
|
||||
|
||||
// TODO: only show roles/members that have access to this channel
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
import { WebSocket, Payload } from "@spacebar/gateway";
|
||||
import {
|
||||
emitEvent,
|
||||
PresenceUpdateEvent,
|
||||
Session,
|
||||
User,
|
||||
ActivitySchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { check } from "./instanceOf";
|
||||
|
||||
export async function onPresenceUpdate(this: WebSocket, { d }: Payload) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
|
||||
export function onRequestGuildMembers(this: WebSocket) {
|
||||
// return this.close(CLOSECODES.Unknown_error);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import { Send } from "../util/Send";
|
||||
|
||||
export async function onResume(this: WebSocket) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Payload, WebSocket } from "@fosscord/gateway";
|
||||
import { Payload, WebSocket } from "@spacebar/gateway";
|
||||
import { genVoiceToken } from "../util/SessionUtils";
|
||||
import { check } from "./instanceOf";
|
||||
import {
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
VoiceStateUpdateEvent,
|
||||
VoiceStateUpdateSchema,
|
||||
Region,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
// TODO: check if a voice server is setup
|
||||
|
||||
// Notice: Bot users respect the voice channel's user limit, if set.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
import { WebSocket, Payload } from "@spacebar/gateway";
|
||||
import { onHeartbeat } from "./Heartbeat";
|
||||
import { onIdentify } from "./Identify";
|
||||
import { onLazyRequest } from "./LazyRequest";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { instanceOf } from "lambert-server";
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { WebSocket } from "@spacebar/gateway";
|
||||
import { CLOSECODES } from "../util/Constants";
|
||||
|
||||
export function check(this: WebSocket, schema: unknown, data: unknown) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// import { VoiceOPCodes } from "@fosscord/webrtc";
|
||||
// import { VoiceOPCodes } from "@spacebar/webrtc";
|
||||
|
||||
export enum OPCODES {
|
||||
Dispatch = 0,
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Payload, WebSocket } from "@fosscord/gateway";
|
||||
import { Payload, WebSocket } from "@spacebar/gateway";
|
||||
import fs from "fs/promises";
|
||||
import path from "path";
|
||||
|
||||
import { ErlpackType, JSONReplacer } from "@fosscord/util";
|
||||
import { ErlpackType, JSONReplacer } from "@spacebar/util";
|
||||
let erlpack: ErlpackType | null = null;
|
||||
try {
|
||||
erlpack = require("erlpack") as ErlpackType;
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Intents, ListenEventOpts, Permissions } from "@fosscord/util";
|
||||
import { Intents, ListenEventOpts, Permissions } from "@spacebar/util";
|
||||
import WS from "ws";
|
||||
import { Deflate, Inflate } from "fast-zlib";
|
||||
// import { Client } from "@fosscord/webrtc";
|
||||
// import { Client } from "@spacebar/webrtc";
|
||||
|
||||
export interface WebSocket extends WS {
|
||||
version: number;
|
||||
|
||||
Reference in New Issue
Block a user