-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Slack Notifications for New User Registrations #413
base: main
Are you sure you want to change the base?
Conversation
services/slack.go
Outdated
// Only send in production | ||
|
||
conf := config.ServerConfig() | ||
if conf.Environment != "production" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only make this check in one place i think, so either removing it from here should be better to allow control from where it been called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, thanks! I've actually removed the check from the function and now only perform it in Register
…s also update env's
services/slack.go
Outdated
return nil | ||
} | ||
|
||
func contains(slice []string, str string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sundayonah this should be moved to utils.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far. Wanted to know if you actually tested this Slack WEBHOOK with live credentials say via Postman and it worked?
…ize existing Contains function, and add new Slack webhook URL
Description
Implements Slack notifications for new user signups, notifying administrators when a user registers. This feature includes user details such as user ID, email, first name, last name, role (provider or sender), and provider-specific details (e.g., currency for providers). The notifications will be sent only in the production environment, and errors in sending the notifications will be logged without interrupting the registration process.
References
n/a
Testing
User signup and Slack notification service integration
Role-specific notifications (provider/sender)
Slack webhook error handling and logging
Environment-specific notification dispatch (production only)
Checklist
closes #410