From 0283e718c5e75a35e573f3fa61e6f353728152c2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 1 Nov 2021 07:19:38 +0300 Subject: Top: do not recommend message twice --- src/main/java/com/juick/XMPPManager.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/main') 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 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()); -- cgit v1.2.3