Merge pull request #10132 from annando/issue-10126
Issue 10126: Transmit "adjust"
This commit is contained in:
commit
f3ffe033c5
3 changed files with 5 additions and 2 deletions
|
@ -513,7 +513,7 @@ class Processor
|
||||||
$event['finish'] = $activity['end-time'];
|
$event['finish'] = $activity['end-time'];
|
||||||
$event['nofinish'] = empty($event['finish']);
|
$event['nofinish'] = empty($event['finish']);
|
||||||
$event['location'] = $activity['location'];
|
$event['location'] = $activity['location'];
|
||||||
$event['adjust'] = true;
|
$event['adjust'] = $activity['adjust'] ?? true;
|
||||||
$event['cid'] = $item['contact-id'];
|
$event['cid'] = $item['contact-id'];
|
||||||
$event['uid'] = $item['uid'];
|
$event['uid'] = $item['uid'];
|
||||||
$event['uri'] = $item['uri'];
|
$event['uri'] = $item['uri'];
|
||||||
|
|
|
@ -1372,6 +1372,7 @@ class Receiver
|
||||||
$object_data = self::getSource($object, $object_data);
|
$object_data = self::getSource($object, $object_data);
|
||||||
$object_data['start-time'] = JsonLD::fetchElement($object, 'as:startTime', '@value');
|
$object_data['start-time'] = JsonLD::fetchElement($object, 'as:startTime', '@value');
|
||||||
$object_data['end-time'] = JsonLD::fetchElement($object, 'as:endTime', '@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['location'] = $location;
|
||||||
$object_data['latitude'] = JsonLD::fetchElement($object, 'as:location', 'as:latitude', '@type', 'as:Place');
|
$object_data['latitude'] = JsonLD::fetchElement($object, 'as:location', 'as:latitude', '@type', 'as:Place');
|
||||||
$object_data['latitude'] = JsonLD::fetchElement($object_data, 'latitude', '@value');
|
$object_data['latitude'] = JsonLD::fetchElement($object_data, 'latitude', '@value');
|
||||||
|
|
|
@ -1408,7 +1408,7 @@ class Transmitter
|
||||||
* @return array with the event data
|
* @return array with the event data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function createEvent($item)
|
private static function createEvent($item)
|
||||||
{
|
{
|
||||||
$event = [];
|
$event = [];
|
||||||
$event['name'] = $item['event-summary'];
|
$event['name'] = $item['event-summary'];
|
||||||
|
@ -1424,6 +1424,8 @@ class Transmitter
|
||||||
$event['location'] = self::createLocation($item);
|
$event['location'] = self::createLocation($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$event['dfrn:adjust'] = (bool)$item['event-adjust'];
|
||||||
|
|
||||||
return $event;
|
return $event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue