Skip to content
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

Event creation notification implementation #6380

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

HelenSotnik
Copy link
Contributor

@HelenSotnik HelenSotnik commented Sep 20, 2023

GreenCity PR

Issue link 📋

[Add event] User is not received a notification on email upon status of event creation #5874

Notification via email about status of event creation has not been implemented.

Summary Of Changes 🔥

  • created class SendEventCreationNotification in service-api
  • added method sendEventCreationNotification in RestClient class
  • code covered by tests
  • changed method save in EventServiceImpl
  • added method sendEmailNotification() in EventServiceImpl

Comment on lines 790 to 794
public void sendEmailNotification(Event event, User user) {
String message = "Dear, " + user.getFirstName() + "!"
+ "\nYou have successfully created an event: " + event.getTitle();
SendEventCreationNotification notification = SendEventCreationNotification.builder()
.email(user.getEmail())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void sendEmailNotification(Event event, User user) {
String message = "Dear, " + user.getFirstName() + "!"
+ "\nYou have successfully created an event: " + event.getTitle();
SendEventCreationNotification notification = SendEventCreationNotification.builder()
.email(user.getEmail())
public void sendEmailNotification(String eventTitle, String userName, String email) {
String message = "Dear, " + userName + "!"
+ "\nYou have successfully created an event: " + eventTitle;
SendEventCreationNotification notification = SendEventCreationNotification.builder()
.email(email)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@HelenSotnik HelenSotnik merged commit a8b5e0e into dev Sep 22, 2023
3 checks passed
@HelenSotnik HelenSotnik deleted the 5874-email-notification-about-event-creation branch September 22, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Add event] User is not received a notification on email upon status of event creation
5 participants