Fix on speaker merge

Change-Id: Ib667f5216d70f4cc2fb7da4e1f3d479c42383903
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-12-04 11:00:37 -03:00
parent 172febf179
commit 9233c40fdd
4 changed files with 14 additions and 17 deletions

View File

@ -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());

View File

@ -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

View File

@ -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()) ;

View File

@ -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)