This commit is contained in:
@@ -159,6 +159,13 @@ export const getAll = query({
|
||||
avatarUrl: string | null;
|
||||
joinSoundUrl: string | null;
|
||||
watchingStream: string | null;
|
||||
// Unix ms of when this voiceState row was created — used by the
|
||||
// sidebar to render the "time in channel" indicator for the
|
||||
// current user. `_creationTime` is populated by Convex
|
||||
// automatically on insert, and since the join/move/afk paths
|
||||
// always delete + insert (never patch across channels) it also
|
||||
// correctly restarts on a channel hop.
|
||||
joinedAt: number;
|
||||
}>> = {};
|
||||
|
||||
for (const s of states) {
|
||||
@@ -183,6 +190,7 @@ export const getAll = query({
|
||||
avatarUrl,
|
||||
joinSoundUrl,
|
||||
watchingStream: s.watchingStream ?? null,
|
||||
joinedAt: s._creationTime,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user