From e5d8ca9c124c4f8805bba9212845f0e21de5d9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 23 Jun 2026 21:43:56 +0200 Subject: Format chatroom messages with Conversation module --- src/Erebos/Chatroom.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Erebos/Chatroom.hs') diff --git a/src/Erebos/Chatroom.hs b/src/Erebos/Chatroom.hs index fce8b1d..c535845 100644 --- a/src/Erebos/Chatroom.hs +++ b/src/Erebos/Chatroom.hs @@ -67,6 +67,11 @@ instance ConversationType ChatroomState ChatMessage where convMessageTime = cmsgTime convMessageText = cmsgText + convMessageExtra msg + | cmsgLeave msg = [ UserLeft ] + | Nothing <- cmsgText msg = [ UserJoined ] + | otherwise = [] + convReference = refDigest . storedRef . head . filterAncestors . concatMap storedRoots . roomStateData convMessageListSince mbSince cstate = ( 0, ) $ -- cgit v1.2.3