anchor.diff:                          undefined ->
                               {noreply, State};
                           _Node ->
  -                            ok = delete_notification(Id, true, State),
  +                            ok = send_delete_notification(Id, true, State),
                               {noreply, State}
                       end
               end;
  
positive.code:     PacketId = binary_to_list(exmpp_session:send_packet(Session, exmpp_stanza:set_sender(IQ, JID))),
      receive
          #received_packet{id=PacketId, raw_packet=Raw} ->
              ?DEBUG(Raw),
              case exmpp_iq:is_error(Raw) of
                  true -> error;
                  _ -> ok
  
negative.code:                 items ->
                      exmpp_xml:foreach(fun(_, Item) -> process_pubsub_item(Item, State) end, Element);
                  delete ->
                      %% We get the pubsub node here which has been
                      %% deleted; look it up in the rsc table (reverse
                      %% lookup - custom pivot?) and delete
                      %% corresponding rsc.
  
                      %% Construct XMPP URI from 'from' and 'node' elements in the received XML.
                      Node = exmpp_xml:get_attribute_as_list(Element, node, undefined),
                      From = exmpp_xml:get_attribute_as_list(Raw, from, undefined),
                      XmppUri = "xmpp:" ++ From ++ "?;node=" ++ Node,
                      %% Reverse lookup xmpp uri -> rsc id
                      case z_pivot_rsc:lookup_custom_pivot(?MODULE, sub_xmpp_uri, XmppUri, State#state.context) of
                          undefined ->
                              ?LOG("Got delete notification but no subscription found for '~p'", [XmppUri]);
                          RscId ->
                              ok = m_rsc:delete(RscId, State#state.context),
                              ?DEBUG("Got delete notification; removed subscription and item.")
                      end,
                      ok
              end
      end.
  
  