mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
ignore non-existent sessions.
This commit is contained in:
parent
da1a796fb8
commit
fcc57bf2fc
@ -173,15 +173,19 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected [EVENT.SESSION_PROFILE]({ id, ...profile }: message.MemberProfile) {
|
protected [EVENT.SESSION_PROFILE]({ id, ...profile }: message.MemberProfile) {
|
||||||
this._localLog.debug(`EVENT.SESSION_PROFILE`, { id })
|
if (id in this._state.sessions) {
|
||||||
Vue.set(this._state.sessions[id], 'profile', profile)
|
this._localLog.debug(`EVENT.SESSION_PROFILE`, { id })
|
||||||
this.emit('session.updated', id)
|
Vue.set(this._state.sessions[id], 'profile', profile)
|
||||||
|
this.emit('session.updated', id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected [EVENT.SESSION_STATE]({ id, ...state }: message.SessionState) {
|
protected [EVENT.SESSION_STATE]({ id, ...state }: message.SessionState) {
|
||||||
this._localLog.debug(`EVENT.SESSION_STATE`, { id })
|
if (id in this._state.sessions) {
|
||||||
Vue.set(this._state.sessions[id], 'state', state)
|
this._localLog.debug(`EVENT.SESSION_STATE`, { id })
|
||||||
this.emit('session.updated', id)
|
Vue.set(this._state.sessions[id], 'state', state)
|
||||||
|
this.emit('session.updated', id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user