user search: Hitting enter narrows to user PM.

Fixes #3874.
This commit is contained in:
Joshua Pan
2017-03-07 03:22:58 +00:00
committed by Tim Abbott
parent 6a8dfe1f3f
commit b1e7ecdad2

View File

@@ -572,6 +572,7 @@ function maybe_select_person(e) {
if ((topPerson !== undefined) && (search_term !== '')) {
// undefined if there are no results
var email = people.get_person_from_user_id(topPerson).email;
narrow.by('pm-with', email, {select_first_unread: true, trigger: 'user sidebar'});
compose.start('private',
{trigger: 'sidebar enter key', private_message_recipient: email});
}