1,添加是否允许机器人发生自定义群通知的开关;2,重构部分代码

This commit is contained in:
heavyrain2012
2021-12-07 13:46:14 +08:00
parent 9858b6060c
commit ef45723043
68 changed files with 230 additions and 107 deletions
@@ -98,8 +98,9 @@ public class SendMessageHandler extends IMHandler<WFCMessage.Message> {
}
@Override
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, boolean isAdmin, WFCMessage.Message message, Qos1PublishHandler.IMCallback callback) {
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, ProtoConstants.RequestSourceType requestSourceType, WFCMessage.Message message, Qos1PublishHandler.IMCallback callback) {
ErrorCode errorCode = ErrorCode.ERROR_CODE_SUCCESS;
boolean isAdmin = requestSourceType == ProtoConstants.RequestSourceType.Request_From_Admin;
if (message != null) {
boolean ignoreMsg = false;
if (!isAdmin) { //admin do not check the right