anchor.diff:                  undefined ->
                       {noreply, State};
                   Uri ->
  -                    ?DEBUG("Unsubscribing!"),
                       {Jid, _Action, Args} = z_xmpp:parse_xmpp_uri(Uri),
                       Node = proplists:get_value("node", Args),
                       SubId = m_rsc:p(Id, pubsub_subscription_subid, Context),
                       ok = unsubscribe_node(SubId, exmpp_jid:to_list(Jid), Node, State),
                       {noreply, State}
  -            end
  +            end;
  +        undefined ->
  +            %% Edge case, is_authoritative is undefined when deleting the rsc that was a (non-auth) subscription.
  +            {noreply, State}
       end;
   
   %% handle_cast({{subscribe_to_url, Url}, _Ctx}, State) ->
  
positive.code: init(Args) ->
      process_flag(trap_exit, true),
      {context, Context} = proplists:lookup(context, Args),
  
      case m_config:get_value(?MODULE, jid, Context) of
          undefined ->
  
negative.code:     z_notifier:detach(rsc_update_done, self(), Context),
      z_notifier:detach(rsc_delete, self(), Context),
      z_notifier:detach(subscribe_to_url, self(), Context),
      z_notifier:detach(custom_pivot, {?MODULE, do_custom_pivot}, Context),
      ok.
  
  %% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}
  