fix duplicate

This commit is contained in:
André Menrath 2024-01-18 17:34:17 +01:00
parent 960d28363b
commit e72e4ad29e
2 changed files with 5 additions and 9 deletions

View file

@ -216,10 +216,7 @@ class Events_Manager extends Post {
if ( 'url' === $this->em_event->event_location_type ) { if ( 'url' === $this->em_event->event_location_type ) {
$attachments[] = $this->get_event_link_attachment(); $attachments[] = $this->get_event_link_attachment();
} }
return $attachments; return $attachments; }
return $attachments;
}
/** /**
* This function tries to map VS-Event categories to Mobilizon event categories. * This function tries to map VS-Event categories to Mobilizon event categories.

View file

@ -289,17 +289,16 @@ class VS_Event extends Post {
->set_end_time() ->set_end_time()
->set_type() ->set_type()
->set_category() ->set_category()
->set_attachments() ->set_attachment()
->set_location() ->set_comments_enabled( true )
->set_comments_enabled( true )
->set_external_participation_url( $this->get_url() ) ->set_external_participation_url( $this->get_url() )
->set_status( 'CONFIRMED' ) ->set_status( 'CONFIRMED' )
->set_name( get_the_title( $this->wp_object->ID ) ) ->set_name( get_the_title( $this->wp_object->ID ) )
->set_is_online( false ) ->set_is_online( false )
->set_in_language( $this->get_locale() ) ->set_in_language( $this->get_locale() )
->set_actor( get_rest_url_by_path( 'application' ) ) ->set_actor( get_rest_url_by_path( 'application' ) )
->set_to( array( 'https://www.w3.org/ns/activitystreams#Public' ) ); ->set_to( array( 'https://www.w3.org/ns/activitystreams#Public' ) )
->set_location();
return $this->ap_object; return $this->ap_object;
} }
} }