filter: Fix sorted_term_types sorting of streams:public.

We had the wrong term type key in the sorting declaration, resulting
in this operator being always sorted last.
This commit is contained in:
Tim Abbott 2020-04-08 11:54:27 -07:00
parent c2876b0271
commit e0d5d5f136
2 changed files with 6 additions and 1 deletions

View File

@ -1233,6 +1233,11 @@ run_test('term_type', () => {
['stream', 'stream', 'topic']
);
assert_term_sort(
['search', 'streams-public'],
['streams-public', 'search']
);
const terms = [
{operator: 'topic', operand: 'lunch'},
{operator: 'sender', operand: 'steve@foo.com'},

View File

@ -623,7 +623,7 @@ Filter.term_type = function (term) {
Filter.sorted_term_types = function (term_types) {
const levels = [
'in',
'streams',
'streams-public',
'stream', 'topic',
'pm-with', 'group-pm-with', 'sender',
'near', 'id',