most recent chat items in getDirectChatPreviews_ (#232)
This commit is contained in:
@@ -34,8 +34,8 @@ serializeChatResponse = unlines . map unStyle . responseToView ""
|
||||
|
||||
responseToView :: String -> ChatResponse -> [StyledString]
|
||||
responseToView cmd = \case
|
||||
CRApiChats chats -> [sShow chats]
|
||||
CRApiDirectChat chat -> [sShow chat]
|
||||
CRApiChats chats -> api [sShow chats]
|
||||
CRApiDirectChat chat -> api [sShow chat]
|
||||
CRNewChatItem (AChatItem _ _ chat item) -> viewChatItem chat item
|
||||
CRCmdAccepted _ -> r []
|
||||
CRChatHelp section -> case section of
|
||||
@@ -114,6 +114,7 @@ responseToView cmd = \case
|
||||
CRMessageError prefix err -> [plain prefix <> ": " <> plain err]
|
||||
CRChatError e -> viewChatError e
|
||||
where
|
||||
api = (highlight cmd :)
|
||||
r = (plain cmd :)
|
||||
-- this function should be `id` in case of asynchronous command responses
|
||||
r' = r
|
||||
|
||||
Reference in New Issue
Block a user