@Override
    public void processPacket(Packet packet) {
      final Presence presence = ((Presence) packet);
      if (presence.getType() != Presence.Type.subscribe) return;
      LOG.info("Subscribe request from " + presence.getFrom());

      if (myIgnoreList.isIgnored(presence.getFrom())) {
        LOG.info(presence.getFrom() + " in ignore list");
        return;
      }

      if (isUserInMyContactListAndActive(presence.getFrom()) || Pico.isUnitTest()) {
        acceptSubscription(presence, true);
        return;
      }

      UIUtil.invokeLater(
          () -> acceptSubscription(presence, myUI.shouldAcceptSubscriptionRequest(presence)));
    }
 public static JabberTransport getInstance() {
   return (JabberTransport) Pico.getInstance().getComponentInstanceOfType(JabberTransport.class);
 }