anchor.diff:          {ok, ChangedPayload} when is_binary(ChangedPayload) ->
               AuthSuccess(Msg#vmq_msg{payload=ChangedPayload}, HookArgs);
           {ok, Args} when is_list(Args) ->
  +            #vmq_msg{reg_view=RegView, mountpoint=MP} = Msg,
               ChangedTopic = proplists:get_value(topic, Args, Topic),
               ChangedPayload = proplists:get_value(payload, Args, Payload),
               ChangedRegView = proplists:get_value(reg_view, Args, RegView),
  
positive.code:             case publish(User, SubscriberId, Msg) of
                  {ok, _} ->
                      _ = vmq_msg_store:deref(SubscriberId, MsgRef),
                      State#state{
                        waiting_acks=dict:erase({qos2, MessageId}, WAcks)};
                  {error, _Reason} ->
                      %% cant publish due to overload or netsplit,
                      %% client will retry
  
negative.code:         false ->
              State
      end,
      NewState2 =
      case handle_messages(Msgs, [], NewState, []) of
          {NewState1, []} ->
              vmq_queue:notify(QPid),
              NewState1;
          {NewState1, Waiting} ->
              %% we call vmq_queue:notify as soon as
              %% the check_in_flight returns true again
              %% SEE: Comment in handle_waiting_msgs function.
              NewState1#state{waiting_msgs=Waiting}
      end,
      {next_state, StateName, maybe_trigger_counter_update(NewState2)};
  handle_info(Info, _StateName, State) ->
      {stop, {error, {unknown_info, Info}}, State} .
  
  