feat(chat): Add a property to indicate whether markdown should be rendered

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2023-07-27 18:25:41 +02:00
parent 3aff970dc1
commit c4a0f78e47
No known key found for this signature in database
GPG key ID: C400AAF20C1BB6FC
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -181,6 +181,7 @@ class Message {
'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) {