频道只有auto为1时才会回调消息和订阅事件。频道只回调用户发送的消息,自己发送的消息不回调
This commit is contained in:
@@ -604,7 +604,7 @@ public class MessagesPublisher {
|
|||||||
public void publish2Receivers(WFCMessage.Message message, Set<String> receivers, String exceptClientId, int pullType) {
|
public void publish2Receivers(WFCMessage.Message message, Set<String> receivers, String exceptClientId, int pullType) {
|
||||||
if (message.getConversation().getType() == ProtoConstants.ConversationType.ConversationType_Channel) {
|
if (message.getConversation().getType() == ProtoConstants.ConversationType.ConversationType_Channel) {
|
||||||
WFCMessage.ChannelInfo channelInfo = m_messagesStore.getChannelInfo(message.getConversation().getTarget());
|
WFCMessage.ChannelInfo channelInfo = m_messagesStore.getChannelInfo(message.getConversation().getTarget());
|
||||||
if (channelInfo != null && !StringUtil.isNullOrEmpty(channelInfo.getCallback())) {
|
if (channelInfo != null && !StringUtil.isNullOrEmpty(channelInfo.getCallback()) && channelInfo.getAutomatic() == 1 && !message.getFromUser().equals(channelInfo.getOwner())) {
|
||||||
OutputClient outputClient = null;
|
OutputClient outputClient = null;
|
||||||
if(m_messagesStore.isChannelCallbackWithClientInfo() && !StringUtil.isNullOrEmpty(exceptClientId)) {
|
if(m_messagesStore.isChannelCallbackWithClientInfo() && !StringUtil.isNullOrEmpty(exceptClientId)) {
|
||||||
Session session = m_sessionsStore.getSession(exceptClientId);
|
Session session = m_sessionsStore.getSession(exceptClientId);
|
||||||
@@ -701,7 +701,7 @@ public class MessagesPublisher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void notifyChannelListenStatusChanged(WFCMessage.ChannelInfo channelInfo, String user, boolean listen) {
|
public void notifyChannelListenStatusChanged(WFCMessage.ChannelInfo channelInfo, String user, boolean listen) {
|
||||||
if (channelInfo == null || StringUtil.isNullOrEmpty(channelInfo.getCallback())) {
|
if (channelInfo == null || StringUtil.isNullOrEmpty(channelInfo.getCallback()) || channelInfo.getAutomatic() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user