Commit 71381e2f authored by JC Brand's avatar JC Brand

Show requesting contacts when filtering by chat state.

Also add an initial test case for filtering by chat state.
parent 7de76924
......@@ -8,6 +8,7 @@
to make it the same as the method of `ChatRoomView`. [jcbrand]
- Render error messages received from the server (for undelivered chat
messages). [jcbrand]
- Show requesting contacts when filtering by chat state. [jcbrand]
## 1.0.3 (2016-06-20)
......
This diff is collapsed.
......@@ -801,9 +801,20 @@
} else {
q = q.toLowerCase();
if (type === 'state') {
if (this.model.get('name') === HEADER_REQUESTING_CONTACTS) {
// When filtering by chat state, we still want to
// show requesting contacts, even though they don't
// have the state in question.
matches = this.model.contacts.filter(
function (contact) {
return utils.contains.not('chat_status', q)(contact) && !contact.get('requesting');
}
);
} else {
matches = this.model.contacts.filter(
utils.contains.not('chat_status', q)
);
}
} else {
matches = this.model.contacts.filter(
utils.contains.not('fullname', q)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment