tweak: ensure most recently interacted with session appears at the top (#1239)
This commit is contained in:
parent
fd98c3189a
commit
b7b0cdbd7c
2 changed files with 3 additions and 4 deletions
|
|
@ -196,6 +196,7 @@ export namespace Server {
|
|||
}),
|
||||
async (c) => {
|
||||
const sessions = await Array.fromAsync(Session.list())
|
||||
sessions.sort((a, b) => b.time.updated - a.time.updated)
|
||||
return c.json(sessions)
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -508,6 +508,8 @@ export namespace Session {
|
|||
for (const part of userParts) {
|
||||
await updatePart(part)
|
||||
}
|
||||
// mark session as updated since a message has been added to it
|
||||
await update(input.sessionID, (_draft) => {})
|
||||
|
||||
if (isLocked(input.sessionID)) {
|
||||
return new Promise((resolve) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue