support 'expires' over Zot6
This commit is contained in:
parent
932b414063
commit
52f8429218
@ -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' ])) {
|
||||
|
@ -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',
|
||||
|
2
boot.php
2
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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user