summaryrefslogtreecommitdiff
path: root/src/Erebos/Chatroom.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-06-23 21:43:56 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-06-24 22:10:58 +0200
commite5d8ca9c124c4f8805bba9212845f0e21de5d9fc (patch)
treeddd83d83591d5cd4f23c593095f101f48a6581ae /src/Erebos/Chatroom.hs
parent32d93542af615cd5d7853916623b5c39c54abd1e (diff)
Format chatroom messages with Conversation module
Diffstat (limited to 'src/Erebos/Chatroom.hs')
-rw-r--r--src/Erebos/Chatroom.hs5
1 files changed, 5 insertions, 0 deletions
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, ) $