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>2021-01-15 12:41:27 +0300
committerJoas Schilling <coding@schilljs.com>2021-02-02 15:52:25 +0300
commit77f6a4ead3891de17295e74acaa976299fa2c616 (patch)
tree4290484315c7c415c4c39bc34dff5c575e5c2941 /lib/Controller/ChatController.php
parentc1fba14e655c72115aaebff30e5276ea2bfaec31 (diff)
Allow to know when deleting might not be sufficient
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/ChatController.php')
-rw-r--r--lib/Controller/ChatController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php
index bc0dcb277..c8c0e3e24 100644
--- a/lib/Controller/ChatController.php
+++ b/lib/Controller/ChatController.php
@@ -29,6 +29,7 @@ use OCA\Talk\Chat\AutoComplete\Sorter;
use OCA\Talk\Chat\ChatManager;
use OCA\Talk\Chat\MessageParser;
use OCA\Talk\GuestManager;
+use OCA\Talk\MatterbridgeManager;
use OCA\Talk\Model\Attendee;
use OCA\Talk\Model\Message;
use OCA\Talk\Model\Session;
@@ -92,6 +93,9 @@ class ChatController extends AEnvironmentAwareController {
/** @var IUserStatusManager */
private $statusManager;
+ /** @var MatterbridgeManager */
+ protected $matterbridgeManager;
+
/** @var SearchPlugin */
private $searchPlugin;
@@ -120,6 +124,7 @@ class ChatController extends AEnvironmentAwareController {
MessageParser $messageParser,
IManager $autoCompleteManager,
IUserStatusManager $statusManager,
+ MatterbridgeManager $matterbridgeManager,
SearchPlugin $searchPlugin,
ISearchResult $searchResult,
ITimeFactory $timeFactory,
@@ -138,6 +143,7 @@ class ChatController extends AEnvironmentAwareController {
$this->messageParser = $messageParser;
$this->autoCompleteManager = $autoCompleteManager;
$this->statusManager = $statusManager;
+ $this->matterbridgeManager = $matterbridgeManager;
$this->searchPlugin = $searchPlugin;
$this->searchResult = $searchResult;
$this->timeFactory = $timeFactory;
@@ -502,7 +508,8 @@ class ChatController extends AEnvironmentAwareController {
$data = $systemMessage->toArray();
$data['parent'] = $message->toArray();
- return new DataResponse($data);
+ $bridge = $this->matterbridgeManager->getBridgeOfRoom($this->room);
+ return new DataResponse($data, $bridge['enabled'] ? Http::STATUS_ACCEPTED: Http::STATUS_OK);
}
/**