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-21 16:33:16 +0300
committerJoas Schilling <coding@schilljs.com>2020-10-30 12:38:09 +0300
commitb76b92fb931748326974e95fbfd329812cd42f49 (patch)
tree5da8714054297ca2aeeef6a9a31c1db9235fdea1 /lib/Activity
parent9fed7b6760d3ecaa27337a86a4cd74e2f173d8a6 (diff)
Fix creating conversations and adding participants
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Activity')
-rw-r--r--lib/Activity/Listener.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php
index 9928c53a9..bd71bf587 100644
--- a/lib/Activity/Listener.php
+++ b/lib/Activity/Listener.php
@@ -199,13 +199,18 @@ class Listener {
}
foreach ($participants as $participant) {
- if ($actorId === $participant['userId']) {
+ if ($participant['actorType'] !== 'users') {
+ // No user => no activity
+ continue;
+ }
+
+ if ($actorId === $participant['actorId']) {
// No activity for self-joining and the creator
continue;
}
try {
- $roomName = $room->getDisplayName($participant['userId']);
+ $roomName = $room->getDisplayName($participant['actorId']);
$event
->setObject('room', $room->getId(), $roomName)
->setSubject('invitation', [
@@ -213,7 +218,7 @@ class Listener {
'room' => $room->getId(),
'name' => $roomName,
])
- ->setAffectedUser($participant['userId']);
+ ->setAffectedUser($participant['actorId']);
$this->activityManager->publish($event);
} catch (\InvalidArgumentException $e) {
$this->logger->error($e->getMessage(), ['exception' => $e]);