From 9233c40fddbab1fac349728eef5c49353a249076 Mon Sep 17 00:00:00 2001 From: smarcet Date: Fri, 4 Dec 2020 11:00:37 -0300 Subject: [PATCH] Fix on speaker merge Change-Id: Ib667f5216d70f4cc2fb7da4e1f3d479c42383903 Signed-off-by: smarcet --- ...itLocationActionSyncWorkRequestFactory.php | 2 +- ...tDeletedCalendarSyncWorkRequestFactory.php | 2 +- ...tUpdatedCalendarSyncWorkRequestFactory.php | 2 +- app/Providers/EventServiceProvider.php | 25 ++++++++----------- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/app/Factories/CalendarAdminActionSyncWorkRequest/AdminSummitLocationActionSyncWorkRequestFactory.php b/app/Factories/CalendarAdminActionSyncWorkRequest/AdminSummitLocationActionSyncWorkRequestFactory.php index e388d78d..092e26d1 100644 --- a/app/Factories/CalendarAdminActionSyncWorkRequest/AdminSummitLocationActionSyncWorkRequestFactory.php +++ b/app/Factories/CalendarAdminActionSyncWorkRequest/AdminSummitLocationActionSyncWorkRequestFactory.php @@ -31,7 +31,7 @@ final class AdminSummitLocationActionSyncWorkRequestFactory public static function build(LocationAction $event, $type){ $resource_server_context = App::make(IResourceServerContext::class); - $current_member = $resource_server_context->getCurrentUser(); + $current_member = $resource_server_context->getCurrentUser(false); $request = new AdminSummitLocationActionSyncWorkRequest; $request->setLocationId($event->getLocationId()); diff --git a/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventDeletedCalendarSyncWorkRequestFactory.php b/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventDeletedCalendarSyncWorkRequestFactory.php index 84edbe77..c5e88331 100644 --- a/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventDeletedCalendarSyncWorkRequestFactory.php +++ b/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventDeletedCalendarSyncWorkRequestFactory.php @@ -33,7 +33,7 @@ final class SummitEventDeletedCalendarSyncWorkRequestFactory $args = $event->getArgs(); $params = $args->getParams(); $resource_server_context = App::make(IResourceServerContext::class); - $current_member = $resource_server_context->getCurrentUser(); + $current_member = $resource_server_context->getCurrentUser(false); $request = null; if(isset($params['published']) && $params['published']){ // just record the published state at the moment of the update diff --git a/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventUpdatedCalendarSyncWorkRequestFactory.php b/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventUpdatedCalendarSyncWorkRequestFactory.php index 02d85db1..daf3e937 100644 --- a/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventUpdatedCalendarSyncWorkRequestFactory.php +++ b/app/Factories/CalendarAdminActionSyncWorkRequest/SummitEventUpdatedCalendarSyncWorkRequestFactory.php @@ -28,7 +28,7 @@ final class SummitEventUpdatedCalendarSyncWorkRequestFactory public static function build(SummitEventUpdated $event){ $resource_server_context = App::make(\models\oauth2\IResourceServerContext::class); $args = $event->getArgs(); - $current_member = $resource_server_context->getCurrentUser(); + $current_member = $resource_server_context->getCurrentUser(false); // sync request from admin $request = new AdminSummitEventActionSyncWorkRequest(); $request->setSummitEvent($event->getSummitEvent()) ; diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 608272b2..6974c437 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -25,9 +25,6 @@ use App\Events\RSVPUpdated; use App\Events\SummitAttendeeTicketRefundAccepted; use App\Events\SummitOrderCanceled; use App\Events\SummitOrderRefundAccepted; -use App\Factories\CalendarAdminActionSyncWorkRequest\AdminSummitLocationActionSyncWorkRequestFactory; -use App\Factories\CalendarAdminActionSyncWorkRequest\SummitEventDeletedCalendarSyncWorkRequestFactory; -use App\Factories\CalendarAdminActionSyncWorkRequest\SummitEventUpdatedCalendarSyncWorkRequestFactory; use App\Factories\EntityEvents\FloorActionEntityEventFactory; use App\Factories\EntityEvents\LocationActionEntityEventFactory; use App\Factories\EntityEvents\LocationImageActionEntityEventFactory; @@ -142,16 +139,16 @@ final class EventServiceProvider extends ServiceProvider Event::listen(\App\Events\SummitEventUpdated::class, function($event) { EntityEventPersister::persist(SummitEventUpdatedEntityEventFactory::build($event)); - AdminSummitEventActionSyncWorkRequestPersister::persist(SummitEventUpdatedCalendarSyncWorkRequestFactory::build($event)); + //AdminSummitEventActionSyncWorkRequestPersister::persist(SummitEventUpdatedCalendarSyncWorkRequestFactory::build($event)); }); Event::listen(\App\Events\SummitEventDeleted::class, function($event) { EntityEventPersister::persist(SummitEventDeletedEntityEventFactory::build($event)); - $request = SummitEventDeletedCalendarSyncWorkRequestFactory::build($event); + /*$request = SummitEventDeletedCalendarSyncWorkRequestFactory::build($event); if(!is_null($request)) - AdminSummitEventActionSyncWorkRequestPersister::persist($request); + AdminSummitEventActionSyncWorkRequestPersister::persist($request);*/ }); Event::listen(\App\Events\PresentationMaterialCreated::class, function($event) @@ -229,25 +226,25 @@ final class EventServiceProvider extends ServiceProvider Event::listen(\App\Events\SummitVenueRoomUpdated::class, function($event) { EntityEventPersister::persist(LocationActionEntityEventFactory::build($event, 'UPDATE')); - $published_events = $event->getRelatedEventIds(); + /*$published_events = $event->getRelatedEventIds(); if(count($published_events) > 0){ AdminSummitLocationActionSyncWorkRequestPersister::persist ( AdminSummitLocationActionSyncWorkRequestFactory::build($event, 'UPDATE') ); - } + }*/ }); Event::listen(\App\Events\SummitVenueRoomDeleted::class, function($event) { EntityEventPersister::persist(LocationActionEntityEventFactory::build($event, 'DELETE')); - $published_events = $event->getRelatedEventIds(); + /*$published_events = $event->getRelatedEventIds(); if(count($published_events) > 0){ AdminSummitLocationActionSyncWorkRequestPersister::persist ( AdminSummitLocationActionSyncWorkRequestFactory::build($event, 'REMOVE') ); - } + }*/ }); Event::listen(\App\Events\LocationInserted::class, function($event) @@ -258,25 +255,25 @@ final class EventServiceProvider extends ServiceProvider Event::listen(\App\Events\LocationUpdated::class, function($event) { EntityEventPersister::persist(LocationActionEntityEventFactory::build($event, 'UPDATE')); - $published_events = $event->getRelatedEventIds(); + /*$published_events = $event->getRelatedEventIds(); if(count($published_events) > 0){ AdminSummitLocationActionSyncWorkRequestPersister::persist ( AdminSummitLocationActionSyncWorkRequestFactory::build($event, 'UPDATE') ); - } + }*/ }); Event::listen(\App\Events\LocationDeleted::class, function($event) { EntityEventPersister::persist(LocationActionEntityEventFactory::build($event, 'DELETE')); - $published_events = $event->getRelatedEventIds(); + /*$published_events = $event->getRelatedEventIds(); if(count($published_events) > 0){ AdminSummitLocationActionSyncWorkRequestPersister::persist ( AdminSummitLocationActionSyncWorkRequestFactory::build($event, 'REMOVE') ); - } + }*/ }); Event::listen(\App\Events\FloorInserted::class, function($event)