aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/ServerManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-03-07 16:01:52 +0300
committerGravatar Vitaly Takmazov2020-03-07 16:01:52 +0300
commitafb897034311fe7e0e981ec44100d3b3fd3ef39d (patch)
tree6104cab72b5eaae4b499e35b7bbc93be875e4336 /src/main/java/com/juick/server/ServerManager.java
parentc9d67837cbcaae84a03b7bd14e508ca62880f87f (diff)
Load EmailManager conditionally
Diffstat (limited to 'src/main/java/com/juick/server/ServerManager.java')
-rw-r--r--src/main/java/com/juick/server/ServerManager.java14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java
index 8a70251f..d3742503 100644
--- a/src/main/java/com/juick/server/ServerManager.java
+++ b/src/main/java/com/juick/server/ServerManager.java
@@ -62,16 +62,9 @@ public class ServerManager implements NotificationListener {
@Value("${service_user:juick}")
private String serviceUsername;
- @Value("${service_email:root@localhost}")
- private String serviceEmail;
private User serviceUser;
- @Inject
- private EmailManager emailManager;
- @Inject
- private ObjectMapper jsonMapper;
-
@PostConstruct
public void init() {
serviceUser = userService.getUserByName(serviceUsername);
@@ -105,13 +98,6 @@ public class ServerManager implements NotificationListener {
processTop(message);
}
}
- try {
- var eventHeader = Collections.singletonMap("X-Event-Version", "1.0");
- emailManager.sendEmail("noreply@juick.com", serviceEmail, "New system event",
- jsonMapper.writeValueAsString(systemEvent.getActivity()), null, eventHeader);
- } catch (JsonProcessingException e) {
- logger.warn("JSON exception", e);
- }
}
private void processMessage(User from, Message jmsg, List<User> subscribers) {
List<User> subscribedUsers = ListUtils.union(subscribers, Collections.singletonList(jmsg.getUser()));