Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admins should not receive push notifications about other people's responses #202

Open
1 of 9 tasks
CeciliaHinga opened this issue Sep 9, 2019 · 6 comments
Open
1 of 9 tasks
Labels
Back-end issues Back end issues bug Something isn't working Design: Interaction Ready for design interaction Design: UI Ready for design UI Design: UX Ready for design UX Front-end Issues that need Front-end code/edits P1 - Immediate QA by Design Issue that needs Quality assurance testing from a design/usability perspective

Comments

@CeciliaHinga
Copy link
Collaborator

From tenfour-archive created by caharding: ushahidi/tenfour-archive#1531

Expected Behaviour

I expect to get push notifications about check-ins I need to respond to and when my response has been received

Actual Behaviour

Admins are getting push notifications about other people's responses being received

Steps to Reproduce

Environment

  • www.tenfour.org
  • app.tenfour.org
  • staging.tenfour.org
  • dev.tenfour.org
  • localhost:8100
  • iOS App (live)
  • iOS App (testflight)
  • Android App (live)
  • Android App (beta)
@CeciliaHinga CeciliaHinga added bug Something isn't working P1 - Immediate labels Sep 9, 2019
@CeciliaHinga
Copy link
Collaborator Author

@mackers looks like theCheckinDetailsPage is subscribing to EVENT_CHECKIN_UPDATED event, but that should only happen when you are currently on that page?

https://github.com/ushahidi/tenfour-mobile/blob/develop/src/pages/checkin-details/checkin-details.ts#L74

@CeciliaHinga
Copy link
Collaborator Author

@mackers also did some digging into this issue, looks like Firebase is automatically showing the notification when it's received, and we're only handling what action to take when the message is clicked.

So if we don't want admins to receive notifications when other people respond, we'll probably need to either:

1. not publish checkin:updated events for admin users

-or-

2. include content_available to trigger a silent notification

On iOS, use this field to represent content-available in the APNs payload. When a notification or message is sent and this is set to true, an inactive client app is awoken, and the message is sent through APNs as a silent notification and not through the FCM connection server. Note that silent notifications in APNs are not guaranteed to be delivered, and can depend on factors such as the user turning on Low Power Mode, force quitting the app, etc. On Android, data messages wake the app by default. On Chrome, currently not supported.

@CeciliaHinga
Copy link
Collaborator Author

@dalezak Had a look at this, but can't figure out where the EVENT_CHECKIN_UPDATED event becomes a notification?

@CeciliaHinga
Copy link
Collaborator Author

No, it seemed to happen all the time.

@CeciliaHinga
Copy link
Collaborator Author

I favour:

  1. not publish checkin:updated events for admin users

I can change that behaviour on the backend.

@CeciliaHinga
Copy link
Collaborator Author

@mackers looks like checkin:updated notifications are not including data.msg or notification.body.

{ 
data:
  checkin_id: "1258"
  gcm.notification.sound: "default"
  msg: ""
  subject: "TenFour Check-In Updated"
  title: "TenFour Check-In Updated"
  type: "checkin:updated"
  from: "804609537189"
notification: {
  title: "TenFour Check-In Updated"
}}

Is there a way on the backend to include this information? When the notifications do show, it would be useful to display this information like in checkin:created.

@dalezak dalezak removed their assignment Oct 21, 2019
@Erioldoesdesign Erioldoesdesign added Back-end issues Back end issues Design: Interaction Ready for design interaction Design: UI Ready for design UI Design: UX Ready for design UX Front-end Issues that need Front-end code/edits QA by Design Issue that needs Quality assurance testing from a design/usability perspective labels Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end issues Back end issues bug Something isn't working Design: Interaction Ready for design interaction Design: UI Ready for design UI Design: UX Ready for design UX Front-end Issues that need Front-end code/edits P1 - Immediate QA by Design Issue that needs Quality assurance testing from a design/usability perspective
Projects
None yet
Development

No branches or pull requests

3 participants