Make nicer slugs for "sender" narrows.

Slugs are now like our "pm-with" slugs:

    narrow/sender/3-cordelia
This commit is contained in:
Steve Howell
2017-01-18 18:53:50 -08:00
committed by Tim Abbott
parent 1ae3feac3e
commit cd6115c24d
4 changed files with 43 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ exports.encodeHashComponent = function (str) {
};
exports.encode_operand = function (operator, operand) {
if (operator === 'pm-with') {
if ((operator === 'pm-with') || (operator === 'sender')) {
var slug = people.emails_to_slug(operand);
if (slug) {
return slug;
@@ -31,7 +31,7 @@ function decodeHashComponent(str) {
}
exports.decode_operand = function (operator, operand) {
if (operator === 'pm-with') {
if ((operator === 'pm-with') || (operator === 'sender')) {
var emails = people.slug_to_emails(operand);
if (emails) {
return emails;