修正当敏感词策略为忽略时敏感词消息会从历史消息功能中拉取的问题

This commit is contained in:
imhao183
2021-01-30 09:09:25 +08:00
parent 59cb884772
commit b4979e5408
6 changed files with 12 additions and 24 deletions
@@ -406,24 +406,12 @@ public class MemoryMessagesStore implements IMessagesStore {
@Override
public int getNotifyReceivers(String fromUser, WFCMessage.Message.Builder messageBuilder, Set<String> notifyReceivers, boolean ignoreMsg) {
public int getNotifyReceivers(String fromUser, WFCMessage.Message.Builder messageBuilder, Set<String> notifyReceivers) {
WFCMessage.Message message = messageBuilder.build();
HazelcastInstance hzInstance = m_Server.getHazelcastInstance();
int type = message.getConversation().getType();
int pullType = ProtoConstants.PullType.Pull_Normal;
if (ignoreMsg) {
if (type == ProtoConstants.ConversationType.ConversationType_ChatRoom) {
pullType = ProtoConstants.PullType.Pull_ChatRoom;
}
// if (message.getContent().getPersistFlag() != Transparent) {
notifyReceivers.add(fromUser);
// }
return pullType;
}
if (type == ProtoConstants.ConversationType.ConversationType_Private) {
notifyReceivers.add(fromUser);
notifyReceivers.add(message.getConversation().getTarget());