aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-26 17:07:23 -0800
committerfriendica <info@friendica.com>2012-11-26 17:07:23 -0800
commited9d7257b03a585bbdd76241e5b49668eb6fc309 (patch)
treee44ff5deb99494ab9df624c6bae5063f5a607a29
parentd79d698beb8827b7d8625a584f25a8c97526603b (diff)
downloadvolse-hubzilla-ed9d7257b03a585bbdd76241e5b49668eb6fc309.tar.gz
volse-hubzilla-ed9d7257b03a585bbdd76241e5b49668eb6fc309.tar.bz2
volse-hubzilla-ed9d7257b03a585bbdd76241e5b49668eb6fc309.zip
fix item_private flag
-rwxr-xr-xinclude/items.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index e1ca03fbb..605dcd51a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -487,6 +487,9 @@ function get_item_elements($x) {
$arr['attach'] = activity_sanitise($x['attach']);
$arr['term'] = decode_tags($x['tags']);
+ $arr['item_private'] = ((array_key_exists('flags',$x) && is_array($x['flags']) && in_array('private',$x['flags'])) ? 1 : 0);
+
+
// Here's the deal - the site might be down or whatever but if there's a new person you've never
// seen before sending stuff to your stream, we MUST be able to look them up and import their data from their
// hub and verify that they are legit - or else we're going to toss the post. We only need to do this
@@ -660,7 +663,7 @@ function encode_item_flags($item) {
$ret[] = 'thread_parent';
if($item['item_flags'] & ITEM_NSFW)
$ret[] = 'nsfw';
- if($item['item_flags'] & ITEM_PRIVATE)
+ if($item['item_private'])
$ret[] = 'private';
return $ret;