in space-slack-sync/src/main/kotlin/org/jetbrains/spaceSlackSync/slack/SlackClient.kt [143:154]
suspend fun tryLookupUserByEmail(email: String): User? {
return try {
fetch(SLACK_ACTION_LOOKUP_USER_BY_EMAIL) { accessToken ->
slackApiClient.methods(accessToken).usersLookupByEmail {
it.email(email)
}
}?.user
} catch (e: Exception) {
log.debug("Slack user not found by email. Slack team id = $teamId")
null
}
}