anchor.diff:  %%-----------------------------------------------------------------------------
   %% Request construction
   %%-----------------------------------------------------------------------------
  +
  +%% ---------------- disco ----------------
  +
  +-spec discover_nodes(escalus_utils:jid_spec(), binary(), binary() | pubsub_node_id()) ->
  +                            exml:element().
  +discover_nodes(User, Id, {NodeAddr, NodeName}) ->
  +    QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [{<<"node">>, NodeName}], []),
  +    iq(<<"get">>, User, Id, NodeAddr, [QueryElement]);
  +discover_nodes(User, Id, NodeAddr) ->
  +    QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [], []),
  +    iq(<<"get">>, User, Id, NodeAddr, [QueryElement]).
  +
  +%% ---------------- create & delete ----------------
   
   -spec create_node(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
   create_node(User, Id, Node) ->
  
positive.code:                            children = AffList },
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, [Affiliations]).
  
  -spec delete_node(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  delete_node(User, Id, {NodeAddr, NodeName}) ->
      Elements = [delete_element(NodeName)],
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec subscribe(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  subscribe(User, Id, Node) ->
  
negative.code:                   children = [XEl] },
      escalus_stanza:from(Msg, escalus_utils:get_jid(User)).
  
  -spec get_pending_subscriptions(escalus_utils:jid_spec(), binary(),
                                      pubsub_node_id() | binary()) -> exml:element().
  get_pending_subscriptions(User, Id, {NodeAddr, NodeName}) ->
      Fields = [ encode_form_field(<<"pubsub#node">>, NodeName) ],
      Payload = [ escalus_stanza:x_data_form(<<"submit">>, Fields) ],
      Node = <<"http://jabber.org/protocol/pubsub#get-pending">>,
      CommandIQ = escalus_stanza:adhoc_request(Node, Payload),
      escalus_stanza:from(escalus_stanza:set_id(escalus_stanza:to(CommandIQ, NodeAddr), Id), User);
  get_pending_subscriptions(User, Id, NodesAddr) ->
      Node = <<"http://jabber.org/protocol/pubsub#get-pending">>,
      CommandIQ = escalus_stanza:adhoc_request(Node, []),
      escalus_stanza:from(escalus_stanza:set_id(escalus_stanza:to(CommandIQ, NodesAddr), Id), User).
  
  -spec get_user_subscriptions(escalus_utils:jid_spec(), binary(),
                                    pubsub_node_id() | binary()) -> exml:element().
  get_user_subscriptions(User, Id, Node) ->
      {Element, NodeAddr}
      = case Node of
            {NodeAddr0, NodeName} -> {subscriptions_element(NodeName, []), NodeAddr0};
  