mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
feat(threads): Expose the topmost parent id for all messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
27d8be28f9
commit
47cb43bf68
2 changed files with 3 additions and 1 deletions
|
|
@ -210,6 +210,7 @@ class Message {
|
|||
'reactions' => $reactions,
|
||||
'expirationTimestamp' => $expireDate ? $expireDate->getTimestamp() : 0,
|
||||
'markdown' => $this->getMessageType() === ChatManager::VERB_SYSTEM ? false : true,
|
||||
'threadId' => (int)$this->getComment()->getTopmostParentId(),
|
||||
];
|
||||
|
||||
if ($this->lastEditActorType && $this->lastEditActorId && $this->lastEditTimestamp) {
|
||||
|
|
@ -223,7 +224,7 @@ class Message {
|
|||
$data['deleted'] = true;
|
||||
}
|
||||
|
||||
$metaData = $this->comment->getMetaData() ?? [];
|
||||
$metaData = $this->getComment()->getMetaData() ?? [];
|
||||
if (!empty($metaData[self::METADATA_SILENT])) {
|
||||
$data[self::METADATA_SILENT] = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ namespace OCA\Talk;
|
|||
* lastEditActorType?: string,
|
||||
* lastEditTimestamp?: int,
|
||||
* silent?: bool,
|
||||
* threadId?: int,
|
||||
* }
|
||||
*
|
||||
* @psalm-type TalkChatProxyMessage = TalkBaseMessage
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue