Add inbox channel validation in create conversation request

This commit is contained in:
Abhinav Raut
2026-04-14 21:28:11 +05:30
parent 35e0884f4a
commit 6146f28126
+3
View File
@@ -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 {