From 562e39c9c5d79823b047886dbfb87deee3f4ca01 Mon Sep 17 00:00:00 2001 From: Zot Date: Sat, 5 Oct 2019 10:31:11 +0200 Subject: another timezone fix --- Zotlabs/Lib/Activity.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index b74f6b2bc..b869c55b5 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -202,6 +202,11 @@ class Activity { $ev = bbtoevent($x['content']); if($ev) { + + if (! $ev['timezone']) { + $ev['timezone'] = 'UTC'; + } + $actor = null; if(array_key_exists('author',$x) && array_key_exists('link',$x['author'])) { $actor = $x['author']['link'][0]['href']; @@ -212,14 +217,14 @@ class Activity { 'name' => $ev['summary'], // 'summary' => bbcode($ev['summary'], [ 'cache' => true ]), // RFC3339 Section 4.3 - 'startTime' => (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')), + 'startTime' => (($ev['adjust']) ? datetime_convert($ev['timezone'],'UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')), 'content' => bbcode($ev['description'], [ 'cache' => true ]), 'location' => [ 'type' => 'Place', 'content' => bbcode($ev['location'], [ 'cache' => true ]) ], 'source' => [ 'content' => format_event_bbcode($ev), 'mediaType' => 'text/bbcode' ], 'actor' => $actor, ]; if(! $ev['nofinish']) { - $y['endTime'] = (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtend'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtend'],'Y-m-d\\TH:i:s-00:00')); + $y['endTime'] = (($ev['adjust']) ? datetime_convert($ev['timezone'],'UTC',$ev['dtend'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtend'],'Y-m-d\\TH:i:s-00:00')); } // copy attachments from the passed object - these are already formatted for ActivityStreams -- cgit v1.2.3 From 79b0a6ba9c1a45f98a39870e424335613dc2e77f Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 5 Oct 2019 10:31:47 +0200 Subject: Allow addons to process forum posts published through mentions --- Zotlabs/Lib/Libzot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 0c90ff34d..100d45c05 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1764,7 +1764,7 @@ class Libzot { // if it's a sourced post, call the post_local hooks as if it were // posted locally so that crosspost connectors will be triggered. - if(check_item_source($arr['uid'], $arr)) { + if(check_item_source($arr['uid'], $arr) || ($channel['xchan_pubforum'] == 1)) { /** * @hooks post_local * Called when an item has been posted on this machine via mod/item.php (also via API). -- cgit v1.2.3 From d6634eb14e3fd6afdfd8b1f0a74a200a55c2826d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 5 Oct 2019 20:02:08 +0000 Subject: fix zap->hubzlla event title compatibility (cherry picked from commit d8b8d8ceb5cc9d701f91dac26834af15f3257cce) --- Zotlabs/Lib/Activity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index b869c55b5..844127ee3 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1693,11 +1693,12 @@ class Activity { } if($act->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']; + $s['obj']['title'] = $act->obj['name']; if(strpos($act->obj['startTime'],'Z')) $s['obj']['adjust'] = true; -- cgit v1.2.3