diff --git a/src/lib/models/ChatRoom.ts b/src/lib/models/ChatRoom.ts index 6d84955..9d557d1 100644 --- a/src/lib/models/ChatRoom.ts +++ b/src/lib/models/ChatRoom.ts @@ -40,7 +40,7 @@ export class ChatRoom extends Model { public async messages({first, offset}: { first: number, offset: number }): Promise { const limit = first ?? 10; offset = offset ?? 0; - return await this.$get("rMessages", {limit, offset}) as ChatMessage[]; + return await this.$get("rMessages", {limit, offset, order: [["id", "DESC"]]}) as ChatMessage[]; } /**