aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ServerManager.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/ServerManager.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/ServerManager.java')
-rw-r--r--src/main/java/com/juick/ServerManager.java13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main/java/com/juick/ServerManager.java b/src/main/java/com/juick/ServerManager.java
index f8f8b8c6..50389705 100644
--- a/src/main/java/com/juick/ServerManager.java
+++ b/src/main/java/com/juick/ServerManager.java
@@ -28,12 +28,10 @@ import com.juick.util.MessageUtils;
import org.apache.commons.collections4.ListUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import javax.annotation.Nonnull;
-import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.Arrays;
@@ -55,18 +53,9 @@ public class ServerManager implements NotificationListener {
@Inject
private UserService userService;
private final CopyOnWriteArrayList<EventSession> sessions = new CopyOnWriteArrayList<>();
-
- @Value("${service_user:juick}")
- private String serviceUsername;
-
+ @Inject
private User serviceUser;
- @PostConstruct
- public void init() {
- serviceUser = userService.getUserByName(serviceUsername);
- }
-
-
private void onJuickPM(final User to, final Message jmsg) {
messageEvent(jmsg, Arrays.asList(to, jmsg.getUser()));
}