mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-07 19:22:43 +02:00
Update User.toJSONForPublic to remove mostRecent key and session key only includes the PlaybackSession
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user