Skip to content

[UHN-BS-35] Help request sends to unavailable responders #72

@mxnyee

Description

@mxnyee

Was this always a problem or am I missing something?

To reproduce:

  • make sure user A is a responder for user B
  • log in as user A and turn off the Naloxone availability switch
  • make a help request for user B
  • result: user A gets a help request notification
  • expected result: A should not get a notification because he doesn't have Naloxone

In help_request.js:71, we're adding all of the user's responders to the help request. But we should filter out the responders who aren't available, right?

Same in notification.service.js:11. We only want the push tokens of responders who are available. Isn't this what the userResponders field in the help_request is for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingendpoint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions