aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2015-06-03 13:58:18 +0200
committerjeroenpraat <jeroenpraat@xs4all.nl>2015-06-03 13:58:18 +0200
commit83d42710df1260276fe10eef8c1fd76d5f7c91d5 (patch)
tree41dbb5f3e3615fff3ec59b9437cb9a1a7db5b7ce
parent76d7278c0a49bd60f6ff521aef458be658c04b47 (diff)
parent86ff31f5003312a6c1bcb65c7aa25ad001f542d4 (diff)
downloadvolse-hubzilla-83d42710df1260276fe10eef8c1fd76d5f7c91d5.tar.gz
volse-hubzilla-83d42710df1260276fe10eef8c1fd76d5f7c91d5.tar.bz2
volse-hubzilla-83d42710df1260276fe10eef8c1fd76d5f7c91d5.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
-rwxr-xr-xinclude/items.php16
-rw-r--r--version.inc2
2 files changed, 14 insertions, 4 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']);
diff --git a/version.inc b/version.inc
index a3c0a8a69..df0133a63 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-06-01.1050
+2015-06-02.1051