$event['finish'] = $activity['end-time'];
$event['nofinish'] = empty($event['finish']);
$event['location'] = $activity['location'];
- $event['adjust'] = true;
+ $event['adjust'] = $activity['adjust'] ?? true;
$event['cid'] = $item['contact-id'];
$event['uid'] = $item['uid'];
$event['uri'] = $item['uri'];
$object_data = self::getSource($object, $object_data);
$object_data['start-time'] = JsonLD::fetchElement($object, 'as:startTime', '@value');
$object_data['end-time'] = JsonLD::fetchElement($object, 'as:endTime', '@value');
+ $object_data['adjust'] = JsonLD::fetchElement($object, 'dfrn:adjust', '@value');
$object_data['location'] = $location;
$object_data['latitude'] = JsonLD::fetchElement($object, 'as:location', 'as:latitude', '@type', 'as:Place');
$object_data['latitude'] = JsonLD::fetchElement($object_data, 'latitude', '@value');
* @return array with the event data
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function createEvent($item)
+ private static function createEvent($item)
{
$event = [];
$event['name'] = $item['event-summary'];
$event['location'] = self::createLocation($item);
}
+ $event['dfrn:adjust'] = (bool)$item['event-adjust'];
+
return $event;
}