mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix: do not add organizer as attendee and set status
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
This commit is contained in:
parent
99d9f51fe6
commit
f7c26ef279
1 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ use OCP\AppFramework\Http\Attribute\PublicPage;
|
|||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Services\IAppConfig;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\Calendar\CalendarEventStatus;
|
||||
use OCP\Calendar\Exceptions\CalendarException;
|
||||
use OCP\Calendar\ICreateFromString;
|
||||
use OCP\Calendar\IManager as ICalendarManager;
|
||||
|
|
@ -2650,6 +2651,7 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
$eventBuilder->setOrganizer($user->getEMailAddress(), $user->getDisplayName() ?: $this->userId);
|
||||
$eventBuilder->setStartDate($startDate);
|
||||
$eventBuilder->setEndDate($endDate);
|
||||
$eventBuilder->setStatus(CalendarEventStatus::CONFIRMED);
|
||||
|
||||
$userAttendees = $this->participantService->getParticipantsByActorType($this->room, Attendee::ACTOR_USERS);
|
||||
foreach ($userAttendees as $userAttendee) {
|
||||
|
|
@ -2664,6 +2666,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
if ($targetUser->getEMailAddress() === null) {
|
||||
continue;
|
||||
}
|
||||
// Do not add the organizer as an attendee
|
||||
if ($targetUser->getEMailAddress() === $user->getEMailAddress()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$eventBuilder->addAttendee(
|
||||
$targetUser->getEMailAddress(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue