diff options
author | Mario <mario@mariovavti.com> | 2019-04-10 13:25:57 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-04-10 13:25:57 +0200 |
commit | e96fa64625447aed6c2ee83f8bb53007a3b8f8ec (patch) | |
tree | c7ed6f6889cc48a2f217acd76057e887912e2346 /Zotlabs/Lib/Activity.php | |
parent | 8dc495c9bcd4e2e59b74913d20b12fada93c5004 (diff) | |
parent | 999ae6eb494dbe7c700d40a2e7557ebee7157d80 (diff) | |
download | volse-hubzilla-e96fa64625447aed6c2ee83f8bb53007a3b8f8ec.tar.gz volse-hubzilla-e96fa64625447aed6c2ee83f8bb53007a3b8f8ec.tar.bz2 volse-hubzilla-e96fa64625447aed6c2ee83f8bb53007a3b8f8ec.zip |
Merge branch 'dev' into 'dev'
Dev
See merge request hubzilla/core!1586
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5b9d356bb..5c3002837 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -14,27 +14,30 @@ class Activity { $x = json_decode($x,true); } - if(is_array($x) && array_key_exists('asld',$x)) { - $x = $x['asld']; - } + if(is_array($x)) { - if($x['type'] === ACTIVITY_OBJ_PERSON) { - return self::fetch_person($x); - } - if($x['type'] === ACTIVITY_OBJ_PROFILE) { - return self::fetch_profile($x); - } - if(in_array($x['type'], [ ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_ARTICLE ] )) { - return self::fetch_item($x); - } - if($x['type'] === ACTIVITY_OBJ_THING) { - return self::fetch_thing($x); - } - if($x['type'] === ACTIVITY_OBJ_EVENT) { - return self::fetch_event($x); - } - if($x['type'] === ACTIVITY_OBJ_PHOTO) { - return self::fetch_image($x); + if(array_key_exists('asld',$x)) { + return $x['asld']; + } + + if($x['type'] === ACTIVITY_OBJ_PERSON) { + return self::fetch_person($x); + } + if($x['type'] === ACTIVITY_OBJ_PROFILE) { + return self::fetch_profile($x); + } + if(in_array($x['type'], [ ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_ARTICLE ] )) { + return self::fetch_item($x); + } + if($x['type'] === ACTIVITY_OBJ_THING) { + return self::fetch_thing($x); + } + if($x['type'] === ACTIVITY_OBJ_EVENT) { + return self::fetch_event($x); + } + if($x['type'] === ACTIVITY_OBJ_PHOTO) { + return self::fetch_image($x); + } } return $x; @@ -189,6 +192,9 @@ class Activity { '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')); + } if($actor) { return $y; } |