aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-02 17:46:22 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-02 17:46:22 -0700
commitb2fde73952c8de7cf8e746ed674770c1dcf6032b (patch)
tree3680ee6fbab89aaa441a727e5fcf139226d47231 /include
parente3606ec56f892caefb44d174608738efd94bef6a (diff)
downloadvolse-hubzilla-b2fde73952c8de7cf8e746ed674770c1dcf6032b.tar.gz
volse-hubzilla-b2fde73952c8de7cf8e746ed674770c1dcf6032b.tar.bz2
volse-hubzilla-b2fde73952c8de7cf8e746ed674770c1dcf6032b.zip
asjld work
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index bb7d9e28c..47a2e6c18 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4902,14 +4902,25 @@ function i2asld($i) {
$ret = array();
+ $ret['@context'] = array( 'http://www.w3.org/ns/activitystreams', 'zot' => 'http://purl.org/zot/protocol');
+
if($i['verb']) {
- $ret['@context'] = dirname($i['verb']);
- $ret['@type'] = ucfirst(basename($i['verb']));
+ if(strpos(dirname($i['verb'],'activitystrea.ms/schema/1.0'))) {
+ $ret['@type'] = ucfirst(basename($i['verb']));
+ }
+ elseif(strpos(dirname($i['verb'],'purl.org/zot'))) {
+ $ret['@type'] = 'zot:' . ucfirst(basename($i['verb']));
+ }
}
$ret['@id'] = $i['plink'];
$ret['published'] = datetime_convert('UTC','UTC',$i['created'],ATOM_TIME);
+ // we need to pass the parent into this
+// if($i['id'] != $i['parent'] && $i['obj_type'] === ACTIVITY_OBJ_NOTE) {
+// $ret['inReplyTo'] = asencode_note
+// }
+
if($i['obj_type'] === ACTIVITY_OBJ_NOTE)
$ret['object'] = asencode_note($i);
@@ -4927,7 +4938,6 @@ function asencode_note($i) {
$ret['@type'] = 'Note';
$ret['@id'] = $i['plink'];
- $ret['@context'] = array('zot' => 'http://purl.org/zot/protocol');
if($i['title'])
$ret['title'] = bbcode($i['title']);
$ret['content'] = bbcode($i['body']);