aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-05-28 16:28:03 -0700
committerzotlabs <mike@macgirvin.com>2019-05-28 16:28:03 -0700
commit52f8429218ae8a0f8c2ff193728e3b4422985207 (patch)
treec0cce9690f62723491fded11c9c78520781b399e /Zotlabs/Lib/Activity.php
parent932b4140637e22e9fb4ff3a91a9c8f186915646b (diff)
downloadvolse-hubzilla-52f8429218ae8a0f8c2ff193728e3b4422985207.tar.gz
volse-hubzilla-52f8429218ae8a0f8c2ff193728e3b4422985207.tar.bz2
volse-hubzilla-52f8429218ae8a0f8c2ff193728e3b4422985207.zip
support 'expires' over Zot6
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php16
1 files changed, 16 insertions, 0 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' ])) {