diff options
author | Mario <mario@mariovavti.com> | 2024-08-02 16:56:59 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-08-02 16:56:59 +0000 |
commit | 8ff870482fcb7df20182bf7613ecd47901aeb468 (patch) | |
tree | 37a04ff1af0559eb24f5bd6572581716b879eb66 /Zotlabs | |
parent | 56cb6f1034b36dca0cd91bc51c491bb2fe5809ef (diff) | |
download | volse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.tar.gz volse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.tar.bz2 volse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.zip |
add support for inbound locations
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 928c8c4bd..1ea42acd3 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2116,6 +2116,13 @@ class Activity { $s['expires'] = datetime_convert('UTC', 'UTC', $act->obj['expires']); } + if ($act->objprop('location')) { + $s['location'] = ((isset($act->objprop('location')['name'])) ? html2plain(purify_html($act->objprop('location')['name'])) : ''); + if (isset($act->objprop('location')['latitude'], $act->objprop('location')['longitude'])) { + $s['coord'] = floatval($act->objprop('location')['latitude']) . ' ' . floatval($act->objprop('location')['longitude']); + } + } + if (in_array($act->type, ['Invite', 'Create']) && $act->objprop('type') === 'Event') { $s['mid'] = $s['parent_mid'] = $act->id; } |