anchor.diff:          _Class:_Error ->
   	    send_packet(Session, exmpp_iq:error(IQ, forbidden))
       end;
  -
   process_iq(_Session, _Type, _NS, IQ) ->
       process_generic(IQ).
   
  
positive.code:         Connect = exmpp_session:connect_TCP(Session, Domain, 5222),
          ok = element(1, Connect),
          {ok, FullJID} = exmpp_session:login(Session, "DIGEST-MD5"),
  	{ok, {FullJID, Session}}
      catch
  	_Class:Error -> {error, Error}
      end.
  
  -spec route_update(binary(), binary()) -> ok.
  route_update(Sender, Recipient) ->
      case exmpp_jid:domain(exmpp_jid:parse(Sender)) of
          <<"chat.facebook.com">> ->
              New = binary_to_list(Recipient),
              [Old, _, _] = string:tokens(New, "_"),
              ej2j_route:update(Old, New);
          _Else -> ok
      end.
  
negative.code: process_iq(Session, "get", ?NS_DISCO_INFO, IQ) ->
      Result = exmpp_iq:result(IQ, ej2j_helper:disco_info()),
      send_packet(Session, Result);
  process_iq(Session, "get", ?NS_DISCO_ITEMS, IQ) ->
      Query = exmpp_xml:element(?NS_DISCO_ITEMS, 'query', [], []),
      Result = exmpp_iq:result(IQ, Query),
      send_packet(Session, Result);
  process_iq(_Session, "result", ?NS_ROSTER, IQ) ->
      Sender = exmpp_stanza:get_sender(IQ),
      Recipient = exmpp_stanza:get_recipient(IQ),
      ok = update_route(Sender, Recipient),
      Component = list_to_binary(ej2j:get_app_env(component, ?COMPONENT)),
      Roster = exmpp_xml:get_element_by_ns(IQ, ?NS_ROSTER),
      Items = lists:map(
  