Add admin flag for all handler

This commit is contained in:
heavyrain lee
2019-04-26 08:06:02 +08:00
parent 9fdc6c2e1b
commit cf619ebeee
43 changed files with 45 additions and 45 deletions
@@ -21,7 +21,7 @@ import static io.moquette.BrokerConstants.MESSAGE_CONTENT_TYPE_CREATE_GROUP;
@Handler(value = IMTopic.CreateGroupTopic)
public class CreateGroupHandler extends GroupHandler<WFCMessage.CreateGroupRequest> {
@Override
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, WFCMessage.CreateGroupRequest request, Qos1PublishHandler.IMCallback callback) {
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, boolean isAdmin, WFCMessage.CreateGroupRequest request, Qos1PublishHandler.IMCallback callback) {
WFCMessage.GroupInfo groupInfo = m_messagesStore.createGroup(fromUser, request.getGroup().getGroupInfo(), request.getGroup().getMembersList());
if (groupInfo != null) {
if(request.hasNotifyContent() && request.getNotifyContent().getType() > 0) {