refactor: Move is_current_user() to people.js.

We no longer have it in util.js, because we will
want to encapsulate this better for upcoming commits
related to email changes.
This commit is contained in:
Steve Howell
2017-01-19 11:18:03 -08:00
committed by Tim Abbott
parent 5d52f1ec17
commit 73125e2718
12 changed files with 33 additions and 28 deletions

View File

@@ -62,13 +62,6 @@ exports.same_stream_and_topic = function util_same_stream_and_topic(a, b) {
(a.subject.toLowerCase() === b.subject.toLowerCase()));
};
exports.is_current_user = function (email) {
if (email === null || email === undefined) {
return false;
}
return email.toLowerCase() === page_params.email.toLowerCase();
};
exports.is_pm_recipient = function (email, message) {
var recipients = message.reply_to.toLowerCase().split(',');
return recipients.indexOf(email.toLowerCase()) !== -1;