feat(message): add replied property to message + replies act as mentions

Fixes #8324
This commit is contained in:
Jonathan Rainville 2022-12-21 18:25:07 -05:00 committed by Iuri Matias
parent c2f84fd882
commit c16e4fe3d2
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,7 @@ type MessageDto* = object
deletedForMe*: bool deletedForMe*: bool
transactionParameters*: TransactionParameters transactionParameters*: TransactionParameters
mentioned*: bool mentioned*: bool
replied*: bool
proc toParsedText*(jsonObj: JsonNode): ParsedText = proc toParsedText*(jsonObj: JsonNode): ParsedText =
result = ParsedText() result = ParsedText()
@ -217,6 +218,7 @@ proc toMessageDto*(jsonObj: JsonNode): MessageDto =
discard jsonObj.getProp("deleted", result.deleted) discard jsonObj.getProp("deleted", result.deleted)
discard jsonObj.getProp("deletedForMe", result.deletedForMe) discard jsonObj.getProp("deletedForMe", result.deletedForMe)
discard jsonObj.getProp("mentioned", result.mentioned) discard jsonObj.getProp("mentioned", result.mentioned)
discard jsonObj.getProp("replied", result.replied)
var quotedMessageObj: JsonNode var quotedMessageObj: JsonNode
if(jsonObj.getProp("quotedMessage", quotedMessageObj)): if(jsonObj.getProp("quotedMessage", quotedMessageObj)):