mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
even better place discovery
This commit is contained in:
parent
5a2bf9838e
commit
6da1eae78e
1 changed files with 8 additions and 3 deletions
|
@ -3288,13 +3288,18 @@ class Activity
|
|||
if (is_array($act->tgt) && $act->tgt['type'] === 'Place') {
|
||||
$location = new Place($act->tgt);
|
||||
}
|
||||
elseif (is_array($act->obj) && $act->obj['type'] === 'Place') {
|
||||
$location = new Place($act->obj);
|
||||
elseif (is_array($act->obj)) {
|
||||
if ($act->obj['type'] === 'Place') {
|
||||
$location = new Place($act->obj);
|
||||
}
|
||||
elseif (is_array($act->obj['location'])) {
|
||||
$location = new Place($act->obj['location']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$location = new Place($act->get_property_obj('location'));
|
||||
}
|
||||
if ($location->getType() === 'Place') {
|
||||
if ($location && $location->getType() === 'Place') {
|
||||
$item['location'] = $location->getName() ? escape_tags($location->getName()) : '';
|
||||
// Look for something resembling latitude/longitude coordinates in the place name and set the
|
||||
// coordinates appropriately. This technically isn't supported but is provided as a convenience
|
||||
|
|
Loading…
Reference in a new issue