compose: Refactor check_stream_for_send error handling.

The extra lines in removed were already part of compose_error.
This commit is contained in:
Tim Abbott 2017-04-28 17:37:29 -07:00
parent 0965c43238
commit e0954d8811
1 changed files with 1 additions and 7 deletions

View File

@ -497,13 +497,6 @@ exports.check_stream_existence = function (stream_name, autosubscribe) {
// false.
function check_stream_for_send(stream_name, autosubscribe) {
var result = exports.check_stream_existence(stream_name, autosubscribe);
if (result === "error") {
compose_error(i18n.t("Error checking subscription"), $("#stream"));
$("#compose-send-button").removeAttr('disabled');
$("#sending-indicator").hide();
}
return result;
}
@ -545,6 +538,7 @@ function validate_stream_message_address_info(stream_name) {
compose_error(response, $('#stream'));
return false;
case "error":
compose_error(i18n.t("Error checking subscription"), $("#stream"));
return false;
case "not-subscribed":
response = "<p>You're not subscribed to the stream <b>" +