mirror of https://github.com/zulip/zulip.git
Fix narrows_by_subject treatment when a private message is selected.
Previously, we were calling util.same_stream_and_subject on a pair of messages, one of which was a private message, which is not valid. We should have instead been calling util.same_recipient, which checks the message type as well. (imported from commit bc5715807036bff1fd4f214dafad00e33678e91d)
This commit is contained in:
parent
41e2bd3f40
commit
4e03ed0b7e
|
@ -946,7 +946,7 @@ $(function () {
|
|||
$("#home").on("click", ".narrows_by_subject", function (e) {
|
||||
var nearest = current_msg_list.get(rows.id($(this).closest(".recipient_row")));
|
||||
var selected = current_msg_list.selected_message();
|
||||
if (util.same_stream_and_subject(nearest, selected)) {
|
||||
if (util.same_recipient(nearest, selected)) {
|
||||
narrow.by_subject(selected.id);
|
||||
} else {
|
||||
narrow.by_subject(nearest.id);
|
||||
|
|
Loading…
Reference in New Issue