public boolean input(JIDContext context, Protocol protocol) {
JID group = super.build(protocol.getTo());
String nickname = group.resource();
MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class);
// relation.activate(),如果已进入房间. group.resource().equals(relation.name()), 昵称未变
return relation.activate() ? group.resource().equals(relation.name()) ? this.resend ? this.proxy.input(context, protocol) : false : this.writeAndReturn(context, group, nickname, relation) : true;
}
private boolean writeAndReturn(JIDContext context, JID group, String nickname, MucRelation relation) {
Room room = this.room.build(group);
// 通知其他房客昵称修改