mirror of https://github.com/zulip/zulip.git
hash_util: Simplify pm_with_uri.
This is easier to read and faster, because it avoids some unnecessary encoding on the pm-with part, plus just a lot of extra logic that amounts to just appending the slug. Performance for this function is relevant because it is used for every user every time we rerender the right sidebar.
This commit is contained in:
parent
9f590889b7
commit
9f8eccdbbf
|
@ -114,9 +114,8 @@ exports.by_sender_uri = function (reply_to) {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.pm_with_uri = function (reply_to) {
|
exports.pm_with_uri = function (reply_to) {
|
||||||
return exports.operators_to_hash([
|
const slug = people.emails_to_slug(reply_to);
|
||||||
{operator: 'pm-with', operand: reply_to},
|
return "#narrow/pm-with/" + slug;
|
||||||
]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.huddle_with_uri = function (user_ids_string) {
|
exports.huddle_with_uri = function (user_ids_string) {
|
||||||
|
|
Loading…
Reference in New Issue