Sort self-replies to the top of the thread (#9296)

Fix #6463
lolsob-rspec
Eugen Rochko 2018-11-16 19:34:10 +01:00 committed by GitHub
parent 7a939f7cfc
commit 76a0c28687
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ module StatusThreadingConcern
# Order ancestors/descendants by tree path
statuses.sort_by! { |status| ids.index(status.id) }
# Bring self-replies to the top
statuses.sort_by! { |status| status.in_reply_to_account_id == status.account_id ? -1 : 0 }
end
def relations_map_for_account(account, account_ids, domains)