Skip to content

Commit 2689186

Browse files
Add auto-leave state to /now (#642)
So a client can show the right data on initial load
1 parent 14c162f commit 2689186

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/controllers/now.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ async function getState(req) {
7676
const booth = getBoothData(uw);
7777
const waitlist = uw.waitlist.getUserIDs();
7878
const waitlistLocked = uw.waitlist.isLocked();
79+
const autoLeave = user != null ? uw.booth.getRemoveAfterCurrentPlay(user) : false;
7980
let activePlaylist = user?.activePlaylist
8081
? uw.playlists.getUserPlaylist(user, user.activePlaylist)
8182
: null;
@@ -110,6 +111,7 @@ async function getState(req) {
110111
booth,
111112
waitlist,
112113
waitlistLocked,
114+
autoLeave,
113115
activePlaylist,
114116
firstActivePlaylistItem,
115117
playlists,

0 commit comments

Comments
 (0)