mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
remove legacy websocket endpoints.
This commit is contained in:
parent
3261cf663a
commit
bc443cb3a0
18
src/app.vue
18
src/app.vue
@ -310,24 +310,6 @@
|
|||||||
this.neko.events.on('broadcast.status', (payload) => {
|
this.neko.events.on('broadcast.status', (payload) => {
|
||||||
console.log('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)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -34,12 +34,6 @@ export interface NekoEvents {
|
|||||||
['clipboard.update']: (text: string) => void
|
['clipboard.update']: (text: string) => void
|
||||||
['screen.size']: (id: string) => void
|
['screen.size']: (id: string) => void
|
||||||
['broadcast.status']: (url: string, isActive: boolean) => 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<NekoEvents> {
|
export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||||
@ -182,50 +176,6 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Admin Events
|
// 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) {
|
protected [EVENT.ADMIN.CONTROL]({ id, target }: AdminTargetPayload) {
|
||||||
if (!target) return
|
if (!target) return
|
||||||
|
|
||||||
|
@ -31,12 +31,6 @@ export const EVENT = {
|
|||||||
DESTROY: 'broadcast/destroy',
|
DESTROY: 'broadcast/destroy',
|
||||||
},
|
},
|
||||||
ADMIN: {
|
ADMIN: {
|
||||||
BAN: 'admin/ban',
|
|
||||||
KICK: 'admin/kick',
|
|
||||||
MUTE: 'admin/mute',
|
|
||||||
UNMUTE: 'admin/unmute',
|
|
||||||
LOCK: 'admin/lock',
|
|
||||||
UNLOCK: 'admin/unlock',
|
|
||||||
CONTROL: 'admin/control',
|
CONTROL: 'admin/control',
|
||||||
RELEASE: 'admin/release',
|
RELEASE: 'admin/release',
|
||||||
GIVE: 'admin/give',
|
GIVE: 'admin/give',
|
||||||
@ -75,13 +69,4 @@ export type BroadcastEvents =
|
|||||||
| typeof EVENT.BROADCAST.CREATE
|
| typeof EVENT.BROADCAST.CREATE
|
||||||
| typeof EVENT.BROADCAST.DESTROY
|
| typeof EVENT.BROADCAST.DESTROY
|
||||||
|
|
||||||
export type AdminEvents =
|
export type AdminEvents = typeof EVENT.ADMIN.CONTROL | typeof EVENT.ADMIN.RELEASE | typeof EVENT.ADMIN.GIVE
|
||||||
| 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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user