diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/juick/server/ServerManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java index 4ea290fc..46faf9eb 100644 --- a/src/main/java/com/juick/server/ServerManager.java +++ b/src/main/java/com/juick/server/ServerManager.java @@ -25,6 +25,7 @@ import com.juick.service.SubscriptionService; import com.juick.service.UserService; import com.juick.service.component.*; 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; @@ -70,7 +71,7 @@ public class ServerManager implements NotificationListener { private void onJuickPM(final User to, final com.juick.Message jmsg) { - messageEvent(jmsg, Collections.singletonList(to)); + messageEvent(jmsg, Arrays.asList(to, jmsg.getUser())); } private void onJuickMessagePost(final com.juick.Message jmsg, List<User> subscribedUsers) { @@ -86,7 +87,7 @@ public class ServerManager implements NotificationListener { @Override public void processMessageEvent(MessageEvent event) { com.juick.Message jmsg = event.getMessage(); - List<User> subscribedUsers = event.getUsers(); + List<User> subscribedUsers = ListUtils.union(event.getUsers(), Collections.singletonList(jmsg.getUser())); if (jmsg.isService()) { readEvent(jmsg, Collections.singletonList(serviceUser)); return; |