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:
authorJoas Schilling <coding@schilljs.com>2022-05-13 12:32:44 +0300
committerJoas Schilling <coding@schilljs.com>2022-05-13 12:32:44 +0300
commit9a25e592b11638da3e85f753cca137cb1dc34304 (patch)
treecfd1ac3bce92d4faad4eae9157c06f8ad316b52b
parent2742779a7621e13bb92a059eda34b4a433f739f9 (diff)
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Chat/AutoComplete/Sorter.php3
-rw-r--r--lib/Controller/ChatController.php2
-rw-r--r--lib/Search/CurrentMessageSearch.php3
-rw-r--r--lib/Search/MessageSearch.php2
4 files changed, 6 insertions, 4 deletions
diff --git a/lib/Chat/AutoComplete/Sorter.php b/lib/Chat/AutoComplete/Sorter.php
index f63d1a284..fe60c2861 100644
--- a/lib/Chat/AutoComplete/Sorter.php
+++ b/lib/Chat/AutoComplete/Sorter.php
@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace OCA\Talk\Chat\AutoComplete;
+use OCA\Talk\Chat\ChatManager;
use OCA\Talk\Chat\CommentsManager;
use OCP\Collaboration\AutoComplete\ISorter;
use OCP\Comments\ICommentsManager;
@@ -59,7 +60,7 @@ class Sorter implements ISorter {
$lastComments = $this->commentsManager->getLastCommentDateByActor(
$context['itemType'],
$context['itemId'],
- 'comment',
+ ChatManager::VERB_MESSAGE,
$type,
array_map(function (array $suggestion) {
return $suggestion['value']['shareWith'];
diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php
index 8e508d0b0..c0e6963ca 100644
--- a/lib/Controller/ChatController.php
+++ b/lib/Controller/ChatController.php
@@ -712,7 +712,7 @@ class ChatController extends AEnvironmentAwareController {
$previousMessage = $this->chatManager->getPreviousMessageWithVerb(
$this->room,
(int)$message->getId(),
- ['comment'],
+ [ChatManager::VERB_MESSAGE],
$message->getVerb() === ChatManager::VERB_MESSAGE
);
$unreadId = (int) $previousMessage->getId();
diff --git a/lib/Search/CurrentMessageSearch.php b/lib/Search/CurrentMessageSearch.php
index 0b855c166..0b2eb93d0 100644
--- a/lib/Search/CurrentMessageSearch.php
+++ b/lib/Search/CurrentMessageSearch.php
@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace OCA\Talk\Search;
+use OCA\Talk\Chat\ChatManager;
use OCA\Talk\Exceptions\ParticipantNotFoundException;
use OCA\Talk\Exceptions\RoomNotFoundException;
use OCA\Talk\Exceptions\UnauthorizedException;
@@ -91,7 +92,7 @@ class CurrentMessageSearch extends MessageSearch {
$comments = $this->chatManager->searchForObjects(
$query->getTerm(),
[(string) $room->getId()],
- 'comment',
+ ChatManager::VERB_MESSAGE,
$offset,
$query->getLimit()
);
diff --git a/lib/Search/MessageSearch.php b/lib/Search/MessageSearch.php
index 0e8dd6fcf..cce960fd2 100644
--- a/lib/Search/MessageSearch.php
+++ b/lib/Search/MessageSearch.php
@@ -134,7 +134,7 @@ class MessageSearch implements IProvider {
$comments = $this->chatManager->searchForObjects(
$query->getTerm(),
array_keys($roomMap),
- 'comment',
+ ChatManager::VERB_MESSAGE,
$offset,
$query->getLimit()
);