anchor.diff:  presence(probe) ->
       exmpp_presence:probe().
   
  -
   presence_error(Presence, Error) ->
       exmpp_presence:error(Presence, Error).
   
  +%% FIXME: see roster_add_contact/3 comment
   presence_direct(Recipient, Type) ->
       Presence = presence(Type),
  -    exmpp_stanza:set_recipient(Presence, escalus_client:short_jid(Recipient)).
  +    exmpp_stanza:set_recipient(Presence, get_short_jid(Recipient)).
   
   presence_show(Presence, Type) ->
       exmpp_presence:set_show(Presence, Type).
  
positive.code: roster_get() ->
      exmpp_client_roster:get_roster().
  
  roster_add_contact(Recipient, Group, Nick) ->
      exmpp_client_roster:set_item(escalus_client:short_jid(Recipient), Group, Nick).
  
  roster_remove_contact(Recipient) ->
      Stanza = exmpp_client_roster:set_item(escalus_client:short_jid(Recipient), [], []),
      Query = exmpp_xml:get_element(Stanza,"query"),
      [Item] = exmpp_xml:get_child_elements(Query),
      ItemNew = exmpp_xml:set_attribute(Item, {<<"subscription">>, "remove"}),
      QueryNew = exmpp_xml:replace_child(Query, Item, ItemNew),
      exmpp_xml:replace_child(Stanza, Query, QueryNew).
  
  privacy_get_all(#client{jid=Jid}) ->
      Query = exmpp_xml:element(?NS_PRIVACY, 'query'),
      Iq = exmpp_iq:get(?NS_JABBER_CLIENT, Query),
      exmpp_stanza:set_sender(Iq, Jid).
  
  privacy_get_one(Client, ListName) ->
      privacy_get_many(Client, [ListName]).
  
  privacy_get_many(#client{jid=Jid}, ListNames) ->
      Query = exmpp_xml:append_children(
          exmpp_xml:element(?NS_PRIVACY, 'query'),
          [ exmpp_xml:set_attribute(exmpp_xml:element('list'),
              {<<"name">>, ListName}) || ListName <- ListNames ]
          ),
      Iq = exmpp_iq:get(?NS_JABBER_CLIENT, Query),
      exmpp_stanza:set_sender(Iq, Jid).
  
  privacy_set_one(#client{jid=Jid}, PrivacyList) ->
      Query = exmpp_xml:append_child(
          exmpp_xml:element(?NS_PRIVACY, 'query'), PrivacyList),
      Iq = exmpp_iq:set(?NS_JABBER_CLIENT, Query),
      exmpp_stanza:set_sender(Iq, Jid).
  
  privacy_active_or_default(#client{jid=Jid}, What, ListName)
      when What =:= 'active';
           What =:= 'default' ->
      exmpp_stanza:set_sender(
  
negative.code:                                 <<"xmlns">>),
                              {<<"name">>, ListName})
                  end )),
          get_jid(Recipient)).
  
  privacy_activate(Client, ListName) ->
      privacy_active_or_default(Client, active, ListName).
  