Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2020-10-26 22:10:42 +0300
committerVincent Petry <vincent@nextcloud.com>2020-10-28 18:59:35 +0300
commit805b1cfc93cfc60247a26fcbece61ffe6804cb61 (patch)
tree7d9e5e5c9b66d53c8af53972eca46bd13d83aa5e /lib
parent7083bbc04fde33bdfad11e80cb7d43d86a562c39 (diff)
Add size to system message from shared file
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Parser/SystemMessage.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php
index 1b892c410..c69aeaf95 100644
--- a/lib/Chat/Parser/SystemMessage.php
+++ b/lib/Chat/Parser/SystemMessage.php
@@ -323,6 +323,7 @@ class SystemMessage {
$share = $this->shareProvider->getShareById($shareId);
$node = $share->getNode();
$name = $node->getName();
+ $size = $node->getSize();
$path = $name;
if (!$participant->isGuest()) {
@@ -349,6 +350,7 @@ class SystemMessage {
$fullPath = $userNode->getPath();
$pathSegments = explode('/', $fullPath, 4);
$name = $userNode->getName();
+ $size = $userNode->getSize();
$path = $pathSegments[3] ?? $path;
}
} else {
@@ -370,6 +372,7 @@ class SystemMessage {
'type' => 'file',
'id' => (string) $node->getId(),
'name' => $name,
+ 'size' => $size,
'path' => $path,
'link' => $url,
'mimetype' => $node->getMimeType(),