aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/Service.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-10-21 22:52:14 +0300
committerGravatar Vitaly Takmazov2021-10-21 22:52:14 +0300
commitc6972c05dcee19afb5725767f755a56f5162aee2 (patch)
tree64b8f3588e97d8e1141fc17646e99a11f57abe46 /src/main/java/com/juick/www/api/Service.java
parentcfb6c1894d8223eac62d03eeececa7baf192aced (diff)
Make popular feed equal to service user recommendations feed to have correct RSS feeds
Diffstat (limited to 'src/main/java/com/juick/www/api/Service.java')
-rw-r--r--src/main/java/com/juick/www/api/Service.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/www/api/Service.java b/src/main/java/com/juick/www/api/Service.java
index 3844d003..fc0132b1 100644
--- a/src/main/java/com/juick/www/api/Service.java
+++ b/src/main/java/com/juick/www/api/Service.java
@@ -75,8 +75,8 @@ public class Service {
private CommandsManager commandsManager;
@Inject
private ApplicationEventPublisher applicationEventPublisher;
- @Value("${api_user:juick}")
- private String serviceUser;
+ @Inject
+ private User serviceUser;
@Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String tmpDir;
@Value("${banned_emails:}")
@@ -90,7 +90,7 @@ public class Service {
@PostMapping("/api/mail")
@ResponseStatus(value = HttpStatus.OK)
public void processMail(@Visitor User current, InputStream data) throws Exception {
- if (current.getName().equals(serviceUser)) {
+ if (current.equals(serviceUser)) {
MimeMessage msg = new MimeMessage(session, data);
String[] returnPaths = msg.getHeader("Return-Path");
if (returnPaths != null) {
@@ -197,7 +197,7 @@ public class Service {
@PostMapping("/api/mail/unsubscribe")
@ResponseStatus(value = HttpStatus.OK)
public void processMailUnsubscribe(@Visitor User current, InputStream data) throws Exception {
- if (current.getName().equals(serviceUser)) {
+ if (current.equals(serviceUser)) {
MimeMessage msg = new MimeMessage(session, data);
String from = msg.getFrom() == null || msg.getFrom().length > 1
? ((InternetAddress) msg.getSender()).getAddress()