core: flatten MsgContainer type to match wire JSON format (#6808)

* core: refactor MsgContainer

* comment

* simplify

* refactor

* corrections

* update

* clean up

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndyandEvgeny Poberezkin authored and GitHub committed 2026-04-15 20:28:31 +01:00
1 parent 5c6514ee91
commit ac6f8b76ac
7 files changed
+188 -198

No files matched your search

+3 -1
View File
@@ -558,7 +558,9 @@ createNewRcvChatItem db user chatDirection RcvMessage {msgId, chatMsgEvent, msgS
quotedItem <- mapM (getChatItemQuote_ db user chatDirection) quotedMsg
pure (ciId, quotedItem, itemForwarded)
where
itemForwarded = cmForwardedFrom chatMsgEvent
itemForwarded = case chatMsgEvent of
ACME _ (XMsgNew MsgContainer {forward}) | forward == Just True -> Just CIFFUnknown
_ -> Nothing
quotedMsg = cmToQuotedMsg chatMsgEvent
quoteRow :: NewQuoteRow
quoteRow = case quotedMsg of