From 8ff870482fcb7df20182bf7613ecd47901aeb468 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 2 Aug 2024 16:56:59 +0000 Subject: add support for inbound locations --- Zotlabs/Lib/Activity.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.2.3