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/Chat
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-07-01 16:50:52 +0300
committerJoas Schilling <coding@schilljs.com>2019-07-01 16:50:52 +0300
commitaa9ddf54683f4f967e7eef69b55a4ca2c258fa1a (patch)
tree3d60918a50e375eac9f7663316fc6e85af370599 /lib/Chat
parent86164d4838a7f2d0102b4bd68f18ceab0bb04a93 (diff)
Circumvent the max message length when reading from database
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Chat')
-rw-r--r--lib/Chat/CommentsManager.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Chat/CommentsManager.php b/lib/Chat/CommentsManager.php
index 214bdc266..eefdab713 100644
--- a/lib/Chat/CommentsManager.php
+++ b/lib/Chat/CommentsManager.php
@@ -52,7 +52,11 @@ class CommentsManager extends Manager {
* @return IComment
*/
public function getCommentFromData(array $data): IComment {
- return new Comment($this->normalizeDatabaseData($data));
+ $message = $data['message'];
+ unset($data['message']);
+ $comment = new Comment($this->normalizeDatabaseData($data));
+ $comment->setMessage($message, ChatManager::MAX_CHAT_LENGTH);
+ return $comment;
}
/**