aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-11-01 07:19:38 +0300
committerGravatar Vitaly Takmazov2021-11-01 07:19:38 +0300
commit0283e718c5e75a35e573f3fa61e6f353728152c2 (patch)
treedecd165e6754cc04fd52e1d644772aa8dd7143ab /src/main/java/com/juick
parente71e88549be3205107ddd69e43fcf6bbc15e82fd (diff)
Top: do not recommend message twice
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/XMPPManager.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java
index be1f8fd6..a7146352 100644
--- a/src/main/java/com/juick/XMPPManager.java
+++ b/src/main/java/com/juick/XMPPManager.java
@@ -339,11 +339,7 @@ public class XMPPManager implements NotificationListener {
if (type.equals(SystemActivity.ActivityType.message)) {
processMessage(activity.getMessage(), activity.getTo());
} else if (type.equals(SystemActivity.ActivityType.like)) {
- if (systemEvent.getActivity().getFrom().equals(serviceUser)) {
- processTop(systemEvent.getActivity().getMessage());
- } else {
- processLike(activity.getFrom(), activity.getMessage(), activity.getTo());
- }
+ processLike(activity.getFrom(), activity.getMessage(), activity.getTo());
}
}
private void processMessage(com.juick.model.Message msg, List<User> subscribers) {
@@ -451,14 +447,6 @@ public class XMPPManager implements NotificationListener {
});
}
- public void processTop(com.juick.model.Message message) {
- try {
- commandsManager.processCommand(serviceUser, String.format("! #%d", message.getMid()), URI.create(StringUtils.EMPTY));
- } catch (Exception e) {
- logger.warn("XMPP error", e);
- }
- }
-
private void incomingPresence(Presence p) {
final String username = p.getTo().getLocal();
final boolean toJuick = username.equals(jid.getLocal());