aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-08-02 16:56:59 +0000
committerMario <mario@mariovavti.com>2024-08-02 16:56:59 +0000
commit8ff870482fcb7df20182bf7613ecd47901aeb468 (patch)
tree37a04ff1af0559eb24f5bd6572581716b879eb66
parent56cb6f1034b36dca0cd91bc51c491bb2fe5809ef (diff)
downloadvolse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.tar.gz
volse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.tar.bz2
volse-hubzilla-8ff870482fcb7df20182bf7613ecd47901aeb468.zip
add support for inbound locations
-rw-r--r--Zotlabs/Lib/Activity.php7
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;
}