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
@@ -25,7 +25,7 @@ import static win.liyufan.im.UserSettingScope.kUserSettingMyChannels;
@Handler(value = IMTopic.CreateChannelTopic)
public class CreateChannelHandler extends GroupHandler<WFCMessage.ChannelInfo> {
@Override
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, WFCMessage.ChannelInfo request, Qos1PublishHandler.IMCallback callback) {
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, boolean isAdmin, WFCMessage.ChannelInfo request, Qos1PublishHandler.IMCallback callback) {
WFCMessage.ChannelInfo.Builder builder = request.toBuilder();
if (StringUtil.isNullOrEmpty(request.getTargetId())) {
builder.setTargetId(m_messagesStore.getShortUUID());