forked from rauchg/slackin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rauchg#80 from jtatum/alreadyreg
Add already registered link
- Loading branch information
Showing
3 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,10 @@ export default function invite({ org, token, email, channel }, fn){ | |
if (!ok) { | ||
if (providedError === 'missing_scope' && needed === 'admin') { | ||
fn(new Error(`Missing admin scope: The token you provided is for an account that is not an admin. You must provide a token from an admin account in order to invite users through the Slack API.`)); | ||
} else if (providedError === 'already_invited') { | ||
fn(new Error('You have already been invited to slack. Check for an email from [email protected].')); | ||
} else if (providedError === 'already_in_team') { | ||
fn(new Error(`Already invited. Sign in at https://${org}.slack.com.`)); | ||
} else { | ||
fn(new Error(providedError)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters