mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 18:24:46 +02:00
Update User.toJSONForPublic to remove mostRecent key and session key only includes the PlaybackSession
This commit is contained in:
parent
09c9c28028
commit
f465193b9c
4 changed files with 26 additions and 60 deletions
|
@ -259,7 +259,7 @@ class PlaybackSessionManager {
|
|||
}
|
||||
|
||||
this.sessions.push(newPlaybackSession)
|
||||
SocketAuthority.adminEmitter('user_stream_update', user.toJSONForPublic(this.sessions, Database.libraryItems))
|
||||
SocketAuthority.adminEmitter('user_stream_update', user.toJSONForPublic(this.sessions))
|
||||
|
||||
return newPlaybackSession
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ class PlaybackSessionManager {
|
|||
await this.saveSession(session)
|
||||
}
|
||||
Logger.debug(`[PlaybackSessionManager] closeSession "${session.id}"`)
|
||||
SocketAuthority.adminEmitter('user_stream_update', user.toJSONForPublic(this.sessions, Database.libraryItems))
|
||||
SocketAuthority.adminEmitter('user_stream_update', user.toJSONForPublic(this.sessions))
|
||||
SocketAuthority.clientEmitter(session.userId, 'user_session_closed', session.id)
|
||||
return this.removeSession(session.id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue