diff --git a/components/parole.tsx b/components/parole.tsx index c211abf0..2f27bfc9 100644 --- a/components/parole.tsx +++ b/components/parole.tsx @@ -9,16 +9,29 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { signIn, useSession } from "next-auth/react"; interface Message { - _id: string; - msg: string; - ts: string; - u: { - _id: string; - username: string; - name?: string; - }; + id: string; + text: string; + timestamp: string; + rawTimestamp: string; roomName: string; roomType: string; + sender: { + _id: string; + username: string; + name: string; + initials: string; + color: string; + }; + isOwnMessage: boolean; + room: { + id: string; + type: string; + name: string; + isChannel: boolean; + isPrivateGroup: boolean; + isDirect: boolean; + link: string; + }; } export function Parole() { @@ -153,23 +166,25 @@ export function Parole() {
No messages found
) : ( messages.map((message) => ( -{message.u.name || message.u.username}
- - {new Date(message.ts).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} - +{message.sender.name}
+ {message.timestamp}{message.msg}
+{message.text}
{message.roomName && (