1
0
forked from PGL/Clyde

added a todo to send an email for every state changement of request

This commit is contained in:
2024-03-17 16:02:30 +01:00
parent 385290d1a2
commit ea46dd664c
2 changed files with 10 additions and 16 deletions

View File

@ -32,6 +32,16 @@ public class InscriptionService {
if (inscriptionRequest == null)
return false;
// if th state is the same we don't send an email
if (requestState == inscriptionRequest.getState())
return false;
/** todo send an email to tell the poster of the inscriptionRequest (inscriptionRequest.getEmail())
* to notify them that the state of their request changed
* FooEmailFormat toSend = (String.format("Your request state changed from %s to %s"),
* inscriptionRequest.getState(), requestState)
* FooEmailSender.send(toSend, inscriptionRequest.getEmail())
*/
inscriptionRequest.setState(requestState);
save(inscriptionRequest);
return true;