shotvibe / shotvibe-web

ShotVibe REST API webservice
1 stars 0 forks source link

Each Album Member can have his own name for an Album #66

Open benny-shotvibe opened 10 years ago

benny-shotvibe commented 10 years ago

We need to allow the user to change an album's name.

Instead of having the name change for everyone, we want each user to be able to set his own individual name for the album, that only he sees.

In order to accomplish this:

  1. We need to add a field to the AlbumMember model called album_name (a string).
  2. We can remove the name field from the Album model since we no longer need it.
  3. When a new user is added to an album, his album_name will be copied from whoever added him.
  4. For the migration, we will simply copy the current name from the Album model for all users
lessandro commented 10 years ago

This change (https://github.com/shotvibe/shotvibe-web/commit/8d45cc31e792d25db14692c55cb5c4413c419a4f) will break the fronted code, which I'm not familiar with.

Some push notification broadcasts contain the album name in the message (e.g. https://github.com/shotvibe/shotvibe-web/blob/master/photos_api/device_push.py#L134). I see two ways to handle this:

(a) don't send the album name (only album id), and let the app query its internal database for the name, and

(b) send a different push notification message to every single user, perhaps grouping users with the same album name (slow!)