diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-06-30 23:18:56 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-02 22:36:12 +0200 |
commit | 7729f1be60bf2c4d38758971bd95d4c6445fde1e (patch) | |
tree | d16753ed86ec36e16651dea3a7ff478d924d830e /main/Test.hs | |
parent | c6ae47e2d1440fbc38d61e38c2d2a1d5843475d1 (diff) |
Chatroom subscriptions
Diffstat (limited to 'main/Test.hs')
-rw-r--r-- | main/Test.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/Test.hs b/main/Test.hs index d5737c2..711f9fa 100644 --- a/main/Test.hs +++ b/main/Test.hs @@ -726,10 +726,11 @@ cmdChatroomWatchLocal = do , [ "new" ], map (show . refDigest . storedRef) (roomStateData room) ] when (any (not . null . rsdMessages . fromStored) (roomStateData room)) $ do - forM_ (getMessagesSinceState room oldroom) $ \msg -> do + forM_ (reverse $ getMessagesSinceState room oldroom) $ \msg -> do outLine out $ unwords $ concat [ [ "chatroom-message-new" ] , [ show . refDigest . storedRef . head . filterAncestors . concatMap storedRoots . toComponents $ room ] + , [ "room", maybe "<unnamed>" T.unpack $ roomName =<< cmsgRoom msg ] , [ "from", maybe "<unnamed>" T.unpack $ idName $ cmsgFrom msg ] , maybe [] (("text":) . (:[]) . T.unpack) $ cmsgText msg ] |