mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 14:15:42 +00:00
Add inbox channel validation in create conversation request
This commit is contained in:
@@ -877,6 +877,9 @@ func validateCreateConversationRequest(req createConversationRequest, app *App)
|
||||
if !inbox.Enabled {
|
||||
return envelope.NewError(envelope.InputError, app.i18n.T("globals.messages.disabled"), nil)
|
||||
}
|
||||
if inbox.Channel != "email" {
|
||||
return envelope.NewError(envelope.InputError, app.i18n.T("globals.messages.somethingWentWrong"), nil)
|
||||
}
|
||||
|
||||
// Validate custom attribute keys. Skip unknown keys.
|
||||
if len(req.CustomAttributes) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user