diff --git a/src/app.vue b/src/app.vue index e84476be..3409ea63 100644 --- a/src/app.vue +++ b/src/app.vue @@ -310,24 +310,6 @@ this.neko.events.on('broadcast.status', (payload) => { console.log('broadcast.status', payload) }) - this.neko.events.on('member.ban', (id, target) => { - console.log('member.ban', id, target) - }) - this.neko.events.on('member.kick', (id, target) => { - console.log('member.kick', id, target) - }) - this.neko.events.on('member.muted', (id, target) => { - console.log('member.muted', id, target) - }) - this.neko.events.on('member.unmuted', (id, target) => { - console.log('member.unmuted', id, target) - }) - this.neko.events.on('room.locked', (id) => { - console.log('room.locked', id) - }) - this.neko.events.on('room.unlocked', (id) => { - console.log('room.unlocked', id) - }) } } diff --git a/src/internal/messages.ts b/src/internal/messages.ts index 33b2663a..75ff35f5 100644 --- a/src/internal/messages.ts +++ b/src/internal/messages.ts @@ -34,12 +34,6 @@ export interface NekoEvents { ['clipboard.update']: (text: string) => void ['screen.size']: (id: string) => void ['broadcast.status']: (url: string, isActive: boolean) => void - ['member.ban']: (id: string, target: string) => void - ['member.kick']: (id: string, target: string) => void - ['member.muted']: (id: string, target: string) => void - ['member.unmuted']: (id: string, target: string) => void - ['room.locked']: (id: string) => void - ['room.unlocked']: (id: string) => void } export class NekoMessages extends EventEmitter { @@ -182,50 +176,6 @@ export class NekoMessages extends EventEmitter { ///////////////////////////// // Admin Events ///////////////////////////// - protected [EVENT.ADMIN.BAN]({ id, target }: AdminTargetPayload) { - if (!target) return - - console.log('EVENT.ADMIN.BAN') - this.emit('member.ban', id, target) - // TODO - } - - protected [EVENT.ADMIN.KICK]({ id, target }: AdminTargetPayload) { - if (!target) return - - console.log('EVENT.ADMIN.KICK') - this.emit('member.kick', id, target) - // TODO - } - - protected [EVENT.ADMIN.MUTE]({ id, target }: AdminTargetPayload) { - if (!target) return - - console.log('EVENT.ADMIN.MUTE') - this.emit('member.muted', id, target) - //user.setMuted({ id: target, muted: true }) - } - - protected [EVENT.ADMIN.UNMUTE]({ id, target }: AdminTargetPayload) { - if (!target) return - - console.log('EVENT.ADMIN.UNMUTE') - this.emit('member.unmuted', id, target) - //user.setMuted({ id: target, muted: false }) - } - - protected [EVENT.ADMIN.LOCK]({ id }: AdminPayload) { - console.log('EVENT.ADMIN.LOCK') - this.emit('room.locked', id) - //setLocked(true) - } - - protected [EVENT.ADMIN.UNLOCK]({ id }: AdminPayload) { - console.log('EVENT.ADMIN.UNLOCK') - this.emit('room.unlocked', id) - //setLocked(false) - } - protected [EVENT.ADMIN.CONTROL]({ id, target }: AdminTargetPayload) { if (!target) return diff --git a/src/types/events.ts b/src/types/events.ts index 31cb9563..88d14cd5 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -31,12 +31,6 @@ export const EVENT = { DESTROY: 'broadcast/destroy', }, ADMIN: { - BAN: 'admin/ban', - KICK: 'admin/kick', - MUTE: 'admin/mute', - UNMUTE: 'admin/unmute', - LOCK: 'admin/lock', - UNLOCK: 'admin/unlock', CONTROL: 'admin/control', RELEASE: 'admin/release', GIVE: 'admin/give', @@ -75,13 +69,4 @@ export type BroadcastEvents = | typeof EVENT.BROADCAST.CREATE | typeof EVENT.BROADCAST.DESTROY -export type AdminEvents = - | typeof EVENT.ADMIN.BAN - | typeof EVENT.ADMIN.KICK - | typeof EVENT.ADMIN.LOCK - | typeof EVENT.ADMIN.UNLOCK - | typeof EVENT.ADMIN.MUTE - | typeof EVENT.ADMIN.UNMUTE - | typeof EVENT.ADMIN.CONTROL - | typeof EVENT.ADMIN.RELEASE - | typeof EVENT.ADMIN.GIVE +export type AdminEvents = typeof EVENT.ADMIN.CONTROL | typeof EVENT.ADMIN.RELEASE | typeof EVENT.ADMIN.GIVE