🐛 fix #450 (only if user is a bot application)
This commit is contained in:
parent
c48eb95af0
commit
bdebf7d205
@ -12,6 +12,7 @@ import {
|
|||||||
PublicUser,
|
PublicUser,
|
||||||
PrivateUserProjection,
|
PrivateUserProjection,
|
||||||
ReadState,
|
ReadState,
|
||||||
|
Application,
|
||||||
} from "@fosscord/util";
|
} from "@fosscord/util";
|
||||||
import { Send } from "../util/Send";
|
import { Send } from "../util/Send";
|
||||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||||
@ -171,6 +172,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
|
|||||||
|
|
||||||
const d: ReadyEventData = {
|
const d: ReadyEventData = {
|
||||||
v: 8,
|
v: 8,
|
||||||
|
application: await Application.findOne({ id: this.user_id }),
|
||||||
user: privateUser,
|
user: privateUser,
|
||||||
user_settings: user.settings,
|
user_settings: user.settings,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -213,7 +215,6 @@ export async function onIdentify(this: WebSocket, data: Payload) {
|
|||||||
users: users.filter((x) => x).unique(),
|
users: users.filter((x) => x).unique(),
|
||||||
merged_members: merged_members,
|
merged_members: merged_members,
|
||||||
// shard // TODO: only for bots sharding
|
// shard // TODO: only for bots sharding
|
||||||
// application // TODO for applications
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: send real proper data structure
|
// TODO: send real proper data structure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user