aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-01-16 17:32:16 -0800
committerzotlabs <mike@macgirvin.com>2019-01-16 17:32:16 -0800
commite9f709301c64ca0f276e089d643da29fe8aada98 (patch)
treeae65aa909e3e0093591202e3d11baa52277eae86 /Zotlabs/Lib/Activity.php
parent7e29bd10b6a59bc9c1700cfb84dbefb6a8930153 (diff)
downloadvolse-hubzilla-e9f709301c64ca0f276e089d643da29fe8aada98.tar.gz
volse-hubzilla-e9f709301c64ca0f276e089d643da29fe8aada98.tar.bz2
volse-hubzilla-e9f709301c64ca0f276e089d643da29fe8aada98.zip
more z6 event work
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index b4d78d809..f87dd6b15 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1455,7 +1455,33 @@ class Activity {
$s['obj_type'] = ACTIVITY_OBJ_COMMENT;
}
- $s['obj'] = $act->obj;
+
+ if($s['obj_type'] === 'Event') {
+ $s['obj'] = [];
+ $s['obj']['asld'] = $act->obj;
+ $s['obj']['type'] = ACTIVITY_OBJ_EVENT;
+ $s['obj']['id'] = $act->obj['id'];
+ $s['obj']['title'] = $act->obj['summary'];
+
+ if(strpos($act->obj['startTime'],'Z'))
+ $s['obj']['adjust'] = true;
+ else
+ $s['obj']['adjust'] = false;
+
+ $s['obj']['dtstart'] = datetime_convert('UTC','UTC',$act->obj['startTime']);
+ if($act->obj['endTime'])
+ $s['obj']['dtend'] = datetime_convert('UTC','UTC',$act->obj['endTime']);
+ else
+ $s['obj']['nofinish'] = true;
+ $s['obj']['description'] = $act->obj['content'];
+
+ if(array_path_exists('location/content',$act->obj))
+ $s['obj']['location'] = $act->obj['location']['content'];
+
+ }
+ else {
+ $s['obj'] = $act->obj;
+ }
$instrument = $act->get_property_obj('instrument');
if((! $instrument) && (! $response_activity)) {