fix: Increase the out of office message length to 10_000 (#7583)

This commit is contained in:
Liam
2023-07-25 04:29:04 +01:00
committed by GitHub
parent a6a0e78bbe
commit 4b27fdf4db
3 changed files with 5 additions and 1 deletions

View File

@@ -183,7 +183,9 @@ export default {
await this.$store.dispatch('inboxes/updateInbox', payload);
this.showAlert(this.$t('INBOX_MGMT.EDIT.API.SUCCESS_MESSAGE'));
} catch (error) {
this.showAlert(this.$t('INBOX_MGMT.EDIT.API.SUCCESS_MESSAGE'));
this.showAlert(
error.message || this.$t('INBOX_MGMT.EDIT.API.ERROR_MESSAGE')
);
}
},
},

View File

@@ -50,6 +50,7 @@ class Inbox < ApplicationRecord
message: I18n.t('errors.inboxes.validations.name') }
validates :account_id, presence: true
validates :timezone, inclusion: { in: TZInfo::Timezone.all_identifiers }
validates :out_of_office_message, length: { maximum: Limits::OUT_OF_OFFICE_MESSAGE_MAX_LENGTH }
validate :ensure_valid_max_assignment_limit
belongs_to :account

View File

@@ -2,4 +2,5 @@ module Limits
BULK_ACTIONS_LIMIT = 100
BULK_EXTERNAL_HTTP_CALLS_LIMIT = 25
URL_LENGTH_LIMIT = 2048 # https://stackoverflow.com/questions/417142
OUT_OF_OFFICE_MESSAGE_MAX_LENGTH = 10_000
end