Package com.sissi.protocol.muc

Examples of com.sissi.protocol.muc.XMucAdmin


    this.relationContext = relationContext;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    XMucAdmin admin = protocol.cast(XMucAdmin.class);
    JID group = super.build(admin.clear().parent().getTo());
    for (Relation relation : this.relationContext.myRelations(group, admin.affiliation())) {
      // Always not hidden, 永远显示JID
      admin.add(new Item(false, relation.cast(MucRelation.class)));
    }
    context.write(protocol.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
View Full Code Here


    this.relationContext = relationContext;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    XMucAdmin admin = protocol.cast(XMucAdmin.class);
    JID group = super.build(admin.clear().parent().getTo());
    Room room = this.room.build(group);
    for (Relation relation : this.relationContext.myRelations(group, admin.role())) {
      // 根据房间配置 可选的JID
      admin.add(new Item(room.allowed(context.jid(), RoomConfig.WHOISALLOW, group.resource(relation.name())), relation.cast(MucRelation.class)));
    }
    context.write(protocol.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
View Full Code Here

TOP

Related Classes of com.sissi.protocol.muc.XMucAdmin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.