mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 02:15:19 +00:00
fix item_private flag
This commit is contained in:
parent
d79d698beb
commit
ed9d7257b0
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue