diff --git a/app/actions.ts b/app/actions.ts index 94016a5..42fa1cd 100644 --- a/app/actions.ts +++ b/app/actions.ts @@ -13,7 +13,9 @@ export async function getChats(userId?: string | null) { try { const pipeline = kv.pipeline() - const chats: string[] = await kv.zrange(`user:chat:${userId}`, 0, -1) + const chats: string[] = await kv.zrange(`user:chat:${userId}`, 0, -1, { + rev: true + }) for (const chat of chats) { pipeline.hgetall(chat)