aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Activity.php16
-rw-r--r--Zotlabs/Module/Apschema.php1
-rwxr-xr-xboot.php2
3 files changed, 18 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 0843e0a7b..dc3cff1e7 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -294,6 +294,10 @@ class Activity {
$ret['published'] = datetime_convert('UTC','UTC',$i['created'],ATOM_TIME);
if($i['created'] !== $i['edited'])
$ret['updated'] = datetime_convert('UTC','UTC',$i['edited'],ATOM_TIME);
+ if ($i['expires'] <= NULL_DATE) {
+ $ret['expires'] = datetime_convert('UTC','UTC',$i['expires'],ATOM_TIME);
+ }
+
if($i['app']) {
$ret['instrument'] = [ 'type' => 'Service', 'name' => $i['app'] ];
}
@@ -1309,6 +1313,12 @@ class Activity {
elseif($act->obj['updated']) {
$s['edited'] = datetime_convert('UTC','UTC',$act->obj['updated']);
}
+ if ($act->data['expires']) {
+ $s['expires'] = datetime_convert('UTC','UTC',$act->data['expires']);
+ }
+ elseif ($act->obj['expires']) {
+ $s['expires'] = datetime_convert('UTC','UTC',$act->obj['expires']);
+ }
if(! $s['created'])
$s['created'] = datetime_convert();
@@ -1493,6 +1503,12 @@ class Activity {
elseif($act->obj['updated']) {
$s['edited'] = datetime_convert('UTC','UTC',$act->obj['updated']);
}
+ if ($act->data['expires']) {
+ $s['expires'] = datetime_convert('UTC','UTC',$act->data['expires']);
+ }
+ elseif ($act->obj['expires']) {
+ $s['expires'] = datetime_convert('UTC','UTC',$act->obj['expires']);
+ }
if(in_array($act->type, [ 'Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'emojiReaction' ])) {
diff --git a/Zotlabs/Module/Apschema.php b/Zotlabs/Module/Apschema.php
index 5b249bfe8..d217041f2 100644
--- a/Zotlabs/Module/Apschema.php
+++ b/Zotlabs/Module/Apschema.php
@@ -27,6 +27,7 @@ class Apschema extends \Zotlabs\Web\Controller {
'nomadicLocation' => 'zot:nomadicLocation',
'nomadicHubs' => 'zot:nomadicHubs',
'emojiReaction' => 'zot:emojiReaction',
+ 'expires' => 'zot:expires',
'magicEnv' => [
'@id' => 'zot:magicEnv',
diff --git a/boot.php b/boot.php
index e76440e10..86c3c3272 100755
--- a/boot.php
+++ b/boot.php
@@ -468,7 +468,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams' );
-define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.4' );
+define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.5' );
/**
* activity stream defines
*/