From a49069db4e4c11c5aed147d59b86b5c01d797b3d Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 Apr 2014 16:26:27 -0700 Subject: move the deleted flag setting to encode_item_flags() where it belongs now that we aren't giving deleted posts special treatment. --- include/items.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 78166a8ab..a7d3a21ce 100755 --- a/include/items.php +++ b/include/items.php @@ -842,9 +842,6 @@ function encode_item($item) { $item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key); } - if($item['item_restrict'] & ITEM_DELETED) { - $x['flags'] = array('deleted'); - } $x['message_id'] = $item['mid']; $x['message_top'] = $item['parent_mid']; @@ -1029,9 +1026,11 @@ function encode_item_flags($item) { // most of item_flags and item_restrict are local settings which don't apply when transmitted. // We may need those for the case of syncing other hub locations which you are attached to. -// ITEM_DELETED is handled in encode_item directly so we don't need to handle it here. $ret = array(); + + if($item['item_restrict'] & ITEM_DELETED) + $ret[] = 'deleted'; if($item['item_flags'] & ITEM_THREAD_TOP) $ret[] = 'thread_parent'; if($item['item_flags'] & ITEM_NSFW) -- cgit v1.2.3