From 462c2e978ee557efd6993f17f269a1613e563c52 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 1 Dec 2024 22:19:45 +0200 Subject: [PATCH] web/timeline: add class to events sent by self Closes #528 --- web/src/ui/timeline/TimelineEvent.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/ui/timeline/TimelineEvent.tsx b/web/src/ui/timeline/TimelineEvent.tsx index cbff6c1..01b2c0b 100644 --- a/web/src/ui/timeline/TimelineEvent.tsx +++ b/web/src/ui/timeline/TimelineEvent.tsx @@ -94,6 +94,9 @@ const TimelineEvent = ({ evt, prevEvt, disableMenu }: TimelineEventProps) => { if (BodyType === HiddenEvent) { wrapperClassNames.push("hidden-event") } + if (evt.sender === client.userID) { + wrapperClassNames.push("own-event") + } let dateSeparator = null const prevEvtDate = prevEvt ? new Date(prevEvt.timestamp) : null if (prevEvtDate && (