mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-18830] Unhelpful error message when adding bot to a channel before adding to team (#12844)
* Fix error message * Rename User to Username * Add '@' to the username
This commit is contained in:
@@ -143,6 +143,10 @@ func (me *InviteProvider) DoCommand(a *App, args *model.CommandArgs, message str
|
||||
var text string
|
||||
if err.Id == "api.channel.add_members.user_denied" {
|
||||
text = args.T("api.command_invite.group_constrained_user_denied")
|
||||
} else if err.Id == "store.sql_team.get_member.missing.app_error" {
|
||||
text = args.T("api.command_invite.user_not_in_team.app_error", map[string]interface{}{
|
||||
"Username": userProfile.Username,
|
||||
})
|
||||
} else {
|
||||
text = args.T("api.command_invite.fail.app_error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user