mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Add compose.update_email().
When we get notified of an email change and the compose box is open for PMs, we should update the email in the compose box. This helper will be useful when we start handling such events.
This commit is contained in:
parent
f56d3807cc
commit
2e07533b4e
@ -734,6 +734,17 @@ exports.has_message_content = function () {
|
||||
return exports.message_content() !== "";
|
||||
};
|
||||
|
||||
exports.update_email = function (user_id, new_email) {
|
||||
var reply_to = exports.recipient();
|
||||
|
||||
if (!reply_to) {
|
||||
return;
|
||||
}
|
||||
|
||||
reply_to = people.update_email_in_reply_to(reply_to, user_id, new_email);
|
||||
|
||||
exports.recipient(reply_to);
|
||||
};
|
||||
|
||||
// *Synchronously* check if a stream exists.
|
||||
exports.check_stream_existence = function (stream_name, autosubscribe) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user