Merge branch 'master' into refactor/dev/connections
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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,
|
||||
@@ -44,14 +44,14 @@ import {
|
||||
Guild,
|
||||
UserTokenData,
|
||||
ConnectedAccount,
|
||||
} 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Fosscord and Fosscord Contributors
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user