mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-13 05:45:03 +00:00
fix op43
This commit is contained in:
@@ -27,7 +27,7 @@ export async function onRequestChannelInfo(this: WebSocket, { d }: Payload) {
|
||||
|
||||
const channels = (
|
||||
await Channel.find({
|
||||
where: { type: ChannelType.GUILD_VOICE },
|
||||
where: { guild_id: d.guild_id, type: ChannelType.GUILD_VOICE },
|
||||
relations: {
|
||||
voice_states: true,
|
||||
},
|
||||
@@ -41,8 +41,8 @@ export async function onRequestChannelInfo(this: WebSocket, { d }: Payload) {
|
||||
guild_id: d.guild_id,
|
||||
channels: channels.map((c) => ({
|
||||
id: c.id,
|
||||
status: null, // TODO: we dont track this
|
||||
voice_start_time: new Date().toISOString(), // TODO: we dont track this
|
||||
status: d.fields.includes("status") ? null : undefined, // TODO: we dont track this
|
||||
voice_start_time: d.fields.includes("voice_start_time") ? new Date().toISOString() : undefined, // TODO: we dont track this
|
||||
})),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user