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
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2021-09-28 18:02:22 +0300
committerVitor Mattos <vitor@php.rio>2021-09-29 14:42:35 +0300
commite89466930fff3c543a9b7630750ab8e99a5b5432 (patch)
treeccea711cfafea6b10c4e41b88630ec76e933872f /lib/Controller/ChatController.php
parentb9be9ae1b1dba86f7c7dbec927438800cd3636f0 (diff)
Moved code to specialist method and add fallback to all
Signed-off-by: Vitor Mattos <vitor@php.rio> Update lib/Chat/ChatManager.php Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Diffstat (limited to 'lib/Controller/ChatController.php')
-rw-r--r--lib/Controller/ChatController.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php
index 0084240b7..920e6dd57 100644
--- a/lib/Controller/ChatController.php
+++ b/lib/Controller/ChatController.php
@@ -706,26 +706,7 @@ class ChatController extends AEnvironmentAwareController {
$results = $this->prepareResultArray($results, $statuses);
- $attendee = $this->participant->getAttendee();
- $userId = $attendee->getActorType() === Attendee::ACTOR_USERS ? $attendee->getActorId() : '';
- $roomDisplayName = $this->room->getDisplayName($userId);
- if (($search === '' || strpos('all', $search) !== false || stripos($roomDisplayName, $search) !== false) && $this->room->getType() !== Room::ONE_TO_ONE_CALL) {
- if ($search === '' ||
- stripos($roomDisplayName, $search) === 0 ||
- strpos('all', $search) === 0) {
- array_unshift($results, [
- 'id' => 'all',
- 'label' => $roomDisplayName,
- 'source' => 'calls',
- ]);
- } else {
- $results[] = [
- 'id' => 'all',
- 'label' => $roomDisplayName,
- 'source' => 'calls',
- ];
- }
- }
+ $results = $this->chatManager->addConversationNotify($results, $search, $this->room, $this->participant);
return new DataResponse($results);
}