From 3b3c05260c6a8b1362ffbd183cc1d86fb7c2f2d6 Mon Sep 17 00:00:00 2001 From: heavyrian2012 Date: Thu, 12 May 2022 08:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=91=E9=81=93automic=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=BA1=E6=89=80=E6=9C=89=E6=B6=88=E6=81=AF=E9=83=BD?= =?UTF-8?q?=E4=B8=8D=E5=8F=91=E9=80=81=E5=88=B0owner=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E8=AE=BAcallback=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/moquette/persistence/MemoryMessagesStore.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java index 341d4a62..d10d627a 100755 --- a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java +++ b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java @@ -577,8 +577,7 @@ public class MemoryMessagesStore implements IMessagesStore { if (channelInfo != null) { if (channelInfo.getOwner().equals(fromUser)) { if(requestSourceType == ProtoConstants.RequestSourceType.Request_From_Channel - && !StringUtil.isNullOrEmpty(channelInfo.getCallback()) - && channelInfo.getAutomatic() == 1) { + && channelInfo.getAutomatic() != 0) { LOG.info("Channel api message not send to the owner when automatic"); } else { notifyReceivers.add(fromUser); @@ -608,8 +607,10 @@ public class MemoryMessagesStore implements IMessagesStore { } } else { notifyReceivers.add(fromUser); - if (StringUtil.isNullOrEmpty(channelInfo.getCallback()) || channelInfo.getAutomatic() == 0) { + if (channelInfo.getAutomatic() == 0) { notifyReceivers.add(channelInfo.getOwner()); + } else { + LOG.info("Channel api message not send to the owner when automatic"); } } } else {