Vortex: prepare push notification response to contain result of multiple endpoints

Review Request #437 — Created May 17, 2016 and submitted

tardypad
Lunr
push_notification_response_endpoint
lunr
Vortex: prepare push notification response to contain result of multiple endpoints

unit tests

  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
pprkut
  1. 
      
  2. I don't understand this comment. Why NULL for only getting the status of one endpoint?

    1. This doesn't have to be NULL
      But we should keep the behavior that the function can be called without argument

      This is for the non multicast calls.
      Otherwise, we are forcing the following:

      $dispatcher->set_endpoints('abcde-12345')
      ->set_payload('payload')
      ->push()
      ->get_status('abcde-12345')

      Not really elegant to have to repeat the endpoint
      And can be annoying depending on where the status is retrieved from the response, we may not have a reference to the endpoint at that place

    2. No, you missunderstood. I have no problem with the code. It's the wording of the comment:

      if more than one endpoint => $endpoint
      if only one endpoint => NULL

      so $dispatcher->set_endpoint() is what is supposed to set the endpoint, if only one endpoint is used. But then how does the dispatcher know the endpoint?

    3. this NULL / empty parameter is for get_status not for set_endpoint

      Not sure what description you prefer me to put there then.

    4. Sorry, my mistake, got confused there.

      I understand now what you mean, but I think it's more confusing to have it like this than just requiring $endpoint always.

  3. 
      
tardypad
  1. 
      
  2. This doesn't have to be NULL
    But we should keep the behavior that the function can be called without argument

    This is for the non multicast calls.
    Otherwise, we are forcing the following:

    $dispatcher->set_endpoints('abcde-12345')
               ->set_payload('payload')
               ->push()
               ->get_status('abcde-12345')
    

    Not really elegant to have to repeat the endpoint
    And can be annoying depending on where the status is retrieved from the response, we may not have a reference to the endpoint at that place

  3. 
      
tardypad
tardypad
pprkut
  1. Ship It!
  2. 
      
tardypad
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...