diff options
author | friendica <info@friendica.com> | 2014-04-10 16:26:27 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-04-10 16:26:27 -0700 |
commit | a49069db4e4c11c5aed147d59b86b5c01d797b3d (patch) | |
tree | ee68e8e6c18588b78702c5c14d16f8dc8d94bdb0 /include | |
parent | bf1f18e172808b0bbeb70180cd0eff305627645a (diff) | |
download | volse-hubzilla-a49069db4e4c11c5aed147d59b86b5c01d797b3d.tar.gz volse-hubzilla-a49069db4e4c11c5aed147d59b86b5c01d797b3d.tar.bz2 volse-hubzilla-a49069db4e4c11c5aed147d59b86b5c01d797b3d.zip |
move the deleted flag setting to encode_item_flags() where it belongs now that we aren't giving deleted posts special treatment.
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 7 |
1 files changed, 3 insertions, 4 deletions
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) |