*/
abstract class ToSelfsPresenceProcessor extends ProxyProcessor {
@Override
public boolean input(JIDContext context, Protocol protocol) {
Presence presence = new Presence();
for (BlockListItem item : protocol.cast(Block.class).getItem()) {
JID to = super.build(item.getJid());
for (JID resource : super.resources(to)) {
// super.findOne(to, true, true) -> Block.item.jid指定资源的JIDContext
super.broadcast(context.jid(), presence.setFrom(resource).clauses(this.build(super.findOne(to, true, true)).clauses()));
}
}
return true;
}