From 5b85f91bb15f5d3ca1f374b5fda3d3169c67cc14 Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Thu, 20 Jun 2024 20:07:51 +0200 Subject: [PATCH] fix(chat): bug fixes for chat and send MessageEntriesModal.tsx --- src/pages/chat/components/Messages.tsx | 7 ++++++- .../e/:eventId/EventLists/Search/MessageEntriesModal.tsx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/chat/components/Messages.tsx b/src/pages/chat/components/Messages.tsx index 860eec1..17bafbc 100644 --- a/src/pages/chat/components/Messages.tsx +++ b/src/pages/chat/components/Messages.tsx @@ -1,7 +1,7 @@ import {MessagesModel} from "@/models/MessageTypes.ts"; import TextEditor from "@/components/input/Editor"; import {useForm} from "@mantine/form"; -import {ActionIcon, Button, Center, Group, Text} from "@mantine/core"; +import {ActionIcon, Button, Center, Divider, Group, Text} from "@mantine/core"; import {IconMessageCircleUp, IconSend} from "@tabler/icons-react"; import classes from './Messages.module.css' import {useInfiniteQuery, useMutation} from "@tanstack/react-query"; @@ -86,6 +86,11 @@ export default function Messages({eventList}: { + {message.comment && <> + + + } +
{humanDeltaFromNow(message.created).message} • {pprintDateTime(message.created)}
diff --git a/src/pages/events/e/:eventId/EventLists/Search/MessageEntriesModal.tsx b/src/pages/events/e/:eventId/EventLists/Search/MessageEntriesModal.tsx index f984bfb..004da76 100644 --- a/src/pages/events/e/:eventId/EventLists/Search/MessageEntriesModal.tsx +++ b/src/pages/events/e/:eventId/EventLists/Search/MessageEntriesModal.tsx @@ -56,6 +56,7 @@ export default function MessageEntriesModal({opened, event, onClose, query}: { await pb.collection("messages").create({ content: formValues.values.content, comment: formValues.values.comment ?? undefined, + sender: user?.id, eventList: l.id, }) }