diff --git a/docs/chat.md b/docs/chat.md index 835f96ae6bf..7e777711513 100644 --- a/docs/chat.md +++ b/docs/chat.md @@ -61,6 +61,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`: since Nextcloud 13 | `parent` | array | **Optional:** See `Parent data` below | | `reactions` | int[] | **Optional:** An array map with relation between reaction emoji and total count of reactions with this emoji | | `reactionsSelf` | string[] | **Optional:** When the user reacted this is the list of emojis the user reacted with | +| `markdown` | bool | **Optional:** Whether the message should be rendered as markdown or shown as plain text | #### Parent data diff --git a/lib/Model/Message.php b/lib/Model/Message.php index 3ef4d6a8204..0be5935dde1 100644 --- a/lib/Model/Message.php +++ b/lib/Model/Message.php @@ -181,6 +181,7 @@ public function toArray(string $format): array { 'referenceId' => (string) $this->getComment()->getReferenceId(), 'reactions' => $reactions, 'expirationTimestamp' => $expireDate ? $expireDate->getTimestamp() : 0, + 'markdown' => $this->getMessageType() === ChatManager::VERB_SYSTEM ? false : true, ]; if ($this->getMessageType() === ChatManager::VERB_MESSAGE_DELETED) {