aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-08 15:18:34 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-08 15:18:34 -0700
commit2656aeaf9cb8482e22055e9c6788fd1593ff3744 (patch)
tree76ed286ff24164eaefd8f92889612400e227555e /include
parentec5d91d8cfcb21ce09f264733a4c587177befca5 (diff)
downloadvolse-hubzilla-2656aeaf9cb8482e22055e9c6788fd1593ff3744.tar.gz
volse-hubzilla-2656aeaf9cb8482e22055e9c6788fd1593ff3744.tar.bz2
volse-hubzilla-2656aeaf9cb8482e22055e9c6788fd1593ff3744.zip
ensure diaspora_signature is converted to json before we store it.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 1551a069a..01b4a3460 100755
--- a/include/items.php
+++ b/include/items.php
@@ -866,6 +866,9 @@ function get_item_elements($x) {
$arr['sig'] = (($x['signature']) ? htmlspecialchars($x['signature'], ENT_COMPAT,'UTF-8',false) : '');
+ if(array_key_exists('diaspora_signature',$x) && is_array($x['diaspora_signature']))
+ $x['diaspora_signature'] = json_encode($x['diaspora_signature']);
+
$arr['diaspora_meta'] = (($x['diaspora_signature']) ? json_encode(crypto_encapsulate($x['diaspora_signature'],$key)) : '');
$arr['object'] = activity_sanitise($x['object']);
$arr['target'] = activity_sanitise($x['target']);