RosterRelation relation = super.ourRelation(context.jid(), super.build(protocol.getTo())).cast(RosterRelation.class);
return relation.ask() ? true : this.establishAndReturn(context, protocol.cast(Presence.class), relation);
}
private boolean establishAndReturn(JIDContext context, Presence presence, RosterRelation relation) {
super.establish(context.jid(), new PresenceRosterRelation(super.build(presence.getTo()), presence, relation));
return true;
}