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>2020-10-22 12:35:28 +0300
committerJoas Schilling <coding@schilljs.com>2020-10-30 12:38:09 +0300
commit542c3792207c5a70ccdefc80f882b23c660cc9d8 (patch)
treedfb6e8e633c30772e63dd55870f03a13b114c9f9 /lib/Manager.php
parentb76b92fb931748326974e95fbfd329812cd42f49 (diff)
Further adjustments in the RoomController
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Manager.php')
-rw-r--r--lib/Manager.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Manager.php b/lib/Manager.php
index 5b3bdbbd2..6b4c23ecc 100644
--- a/lib/Manager.php
+++ b/lib/Manager.php
@@ -29,6 +29,7 @@ use OCA\Talk\Exceptions\ParticipantNotFoundException;
use OCA\Talk\Exceptions\RoomNotFoundException;
use OCA\Talk\Model\AttendeeMapper;
use OCA\Talk\Model\SessionMapper;
+use OCA\Talk\Service\ParticipantService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Comments\IComment;
use OCP\Comments\ICommentsManager;
@@ -57,6 +58,8 @@ class Manager {
private $attendeeMapper;
/** @var SessionMapper */
private $sessionMapper;
+ /** @var ParticipantService */
+ private $participantService;
/** @var ISecureRandom */
private $secureRandom;
/** @var IUserManager */
@@ -79,6 +82,7 @@ class Manager {
Config $talkConfig,
AttendeeMapper $attendeeMapper,
SessionMapper $sessionMapper,
+ ParticipantService $participantService,
ISecureRandom $secureRandom,
IUserManager $userManager,
CommentsManager $commentsManager,
@@ -92,6 +96,7 @@ class Manager {
$this->talkConfig = $talkConfig;
$this->attendeeMapper = $attendeeMapper;
$this->sessionMapper = $sessionMapper;
+ $this->participantService = $participantService;
$this->secureRandom = $secureRandom;
$this->userManager = $userManager;
$this->commentsManager = $commentsManager;
@@ -650,8 +655,12 @@ class Manager {
if ($row === false) {
$room = $this->createRoom(Room::CHANGELOG_CONVERSATION, $userId);
- $room->addUsers(['userId' => $userId]);
$room->setReadOnly(Room::READ_ONLY);
+
+ $this->participantService->addUsers($room,[[
+ 'actorType' => 'users',
+ 'actorId' => $userId,
+ ]]);
return $room;
}
@@ -660,7 +669,10 @@ class Manager {
try {
$room->getParticipant($userId);
} catch (ParticipantNotFoundException $e) {
- $room->addUsers(['userId' => $userId]);
+ $this->participantService->addUsers($room,[[
+ 'actorType' => 'users',
+ 'actorId' => $userId,
+ ]]);
}
return $room;