shotvibe / shotvibe-web

ShotVibe REST API webservice
1 stars 0 forks source link

Fix up push notifications #70

Open benny-shotvibe opened 10 years ago

benny-shotvibe commented 10 years ago

These are the types of push notifications:

  1. "User {John} added {2} photos to the album {Party}"

    This should be sent to all members of the album, but not sent to the user who added the photos (in this case John)

  2. "User {John} added you to the album {Party}"

    This should be sent to all members who were just added to the album, but not sent to the user who added them. specifically, this should not be sent to John when John creates a new album

  3. Silent: Sync a single album (with a given id)

    When a user adds photos to an album, this should be sent to the same user. This allows all the other devices of the user to sync.

    When any user deletes photos from an album, this should be sent to all members of the album. Note that we there is never a "loud" notification that photos have been deleted, so this notification type can be used always when photos are deleted, for all users (the user who deleted + all others in the album)

  4. Silent: Sync the entire album list

    When a user creates a new album, or leaves an album, this should be sent to himself, so that all his other devices will sync.

Ideally, we should have comprehensive unit tests to test all the different scenarios