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:
authorVincent Petry <vincent@nextcloud.com>2021-01-29 18:53:41 +0300
committerVincent Petry <vincent@nextcloud.com>2021-01-29 18:53:41 +0300
commit0d70608041cc55afcddd5f7f442fd1e310512c73 (patch)
treed48d62b04775c0a3f5eb4a3a201653abc77a8b86 /lib/Controller
parenta18a3e682b38b19320cad9d3b2b767179302da0a (diff)
Add participant action to resend email invitation
Allow moderators to resend email invitations to individual participants in the participant list's actions menu. Adjusted endpoints to work with attendeeId as it was needed. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/RoomController.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index cc0ad6168..31192308e 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1816,15 +1816,21 @@ class RoomController extends AEnvironmentAwareController {
* @NoAdminRequired
* @RequireModeratorParticipant
*
- * @param ?string $participant participant
+ * @param int|null $attendeeId attendee id
+ * @param string|null $participant participant
* @return DataResponse
*/
- public function resendInvitations(?string $participant): DataResponse {
+ public function resendInvitations(?int $attendeeId, ?string $participant): DataResponse {
$participants = [];
+
// targetting specific participant
if ($participant !== null) {
try {
- $participants[] = $this->room->getParticipant($participant);
+ if ($attendeeId !== null) {
+ $participants[] = $this->room->getParticipantByAttendeeId($attendeeId);
+ } elseif ($participant !== null) {
+ $participants[] = $this->room->getParticipant($participant);
+ }
} catch (ParticipantNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
@@ -1832,6 +1838,7 @@ class RoomController extends AEnvironmentAwareController {
$participants = $this->participantService->getParticipantsForRoom($this->room);
}
+ \OCP\Util::writeLog('spreed', '#### participants: ' . $participants , \OCP\ILogger::DEBUG);
foreach ($participants as $participant) {
if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_EMAILS) {
// generate PIN if applicable