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:
Tim Abbott 2013-04-22 13:35:23 -04:00
parent 41e2bd3f40
commit 4e03ed0b7e
1 changed files with 1 additions and 1 deletions

View File

@ -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);