添加关闭群主撤回群成员消息的功能
This commit is contained in:
@@ -164,6 +164,8 @@ public final class BrokerConstants {
|
||||
public static final String MESSAGES_DISABLE_REMOTE_SEARCH = "message.disable_remote_search";
|
||||
|
||||
public static final String MESSAGES_RECALL_TIME_LIMIT = "message.recall_time_limit";
|
||||
public static final String MESSAGES_DISABLE_GROUP_MANAGER_RECALL = "message.disable_group_manager_recall";
|
||||
|
||||
|
||||
private BrokerConstants() {
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
private List<Integer> mGlobalMuteExceptionTypes = new ArrayList<>();
|
||||
|
||||
private long mRecallTimeLimit = 300;
|
||||
|
||||
private boolean mDisableGroupManagerRecall = false;
|
||||
private String mGroupInfoUpdateCallback;
|
||||
private String mGroupMemberUpdateCallback;
|
||||
private String mRelationUpdateCallback;
|
||||
@@ -263,6 +263,12 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
try {
|
||||
mDisableGroupManagerRecall = Boolean.parseBoolean(m_Server.getConfig().getProperty(BrokerConstants.MESSAGES_DISABLE_GROUP_MANAGER_RECALL, "false"));
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
String strTypes = m_Server.getConfig().getProperty(BrokerConstants.MESSAGES_FORBIDDEN_CLIENT_SEND_TYPES);
|
||||
if(!StringUtil.isNullOrEmpty(strTypes)) {
|
||||
@@ -1832,7 +1838,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
}
|
||||
}
|
||||
|
||||
if (!canRecall && message.getConversation().getType() == ProtoConstants.ConversationType.ConversationType_Group) {
|
||||
if (!canRecall && !mDisableGroupManagerRecall && message.getConversation().getType() == ProtoConstants.ConversationType.ConversationType_Group) {
|
||||
IMap<String, WFCMessage.GroupInfo> groupMap = hzInstance.getMap(GROUPS_MAP);
|
||||
|
||||
WFCMessage.GroupInfo groupInfo = groupMap.get(message.getConversation().getTarget());
|
||||
|
||||
Reference in New Issue
Block a user