diff options
author | Vitor Mattos <vitor@php.rio> | 2022-03-03 15:51:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-03 15:51:37 +0300 |
commit | a044a8a1f4d790477fa227dec3202036d03122c8 (patch) | |
tree | 92f831d453d0860a332c7e1951f0c50f7a2938f5 | |
parent | 22fde9eb56285b43ef18e2693d7dbde4d8c3cd15 (diff) | |
parent | 285e7396cafed6f5e962b723171596dcc917d38b (diff) |
Merge pull request #6953 from nextcloud/feature/return-empty-array-when-comment-havent-reactions
Return empty array when comment haven't reactions
-rw-r--r-- | lib/Chat/ReactionManager.php | 1 | ||||
-rw-r--r-- | tests/integration/features/reaction/react.feature | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Chat/ReactionManager.php b/lib/Chat/ReactionManager.php index 4b4576ea4..d4554f7a6 100644 --- a/lib/Chat/ReactionManager.php +++ b/lib/Chat/ReactionManager.php @@ -114,6 +114,7 @@ class ReactionManager { $comments = $this->commentsManager->retrieveAllReactions($messageId); } + $reactions = []; foreach ($comments as $comment) { $message = $this->messageParser->createMessage($chat, $participant, $comment, $this->l); $this->messageParser->parseMessage($message); diff --git a/tests/integration/features/reaction/react.feature b/tests/integration/features/reaction/react.feature index e95805816..432990640 100644 --- a/tests/integration/features/reaction/react.feature +++ b/tests/integration/features/reaction/react.feature @@ -51,6 +51,8 @@ Feature: reaction/react | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) And user "participant1" sends message "Message 1" to room "room" with 201 + Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room" with 200 + | actorType | actorId | actorDisplayName | reaction | And user "participant1" react with "👍" on message "Message 1" to room "room" with 201 And user "participant2" react with "👍" on message "Message 1" to room "room" with 201 Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room" with 200 |