Roxot / polly

Event planning made easy.
www.getpollyapp.com
0 stars 0 forks source link

Last event info added to poll objects & undo vote notification title #12

Closed Roxot closed 8 years ago

Roxot commented 8 years ago

Poll objects and messages now carry three new fields describing the latest activity in that poll. The three added fields are last_event_type, last_event_user and last_event_title and carry the same meaning as the type, user and title fields respectively in existing notification objects. This PR addresses issues #9, related to the above and issue #11, so that now the the title field in notifications in EVENT_TYPE_UNDONE_VOTE events is properly filled.

Roxot commented 8 years ago

Needs to be tested before merge into master. Also, currently there are two types of notifications sent out when a user is added to a poll. To all existing users a notification is sent like this:

{
    "type" : EVENT_TYPE_NEW_PARTICIPANT,
    "user" : {newUser.DisplayName},
    "title" : {poll.Title}
}

while to the added user, the following is sent:

{
    "type" : EVENT_TYPE_ADDED_TO_POLL,
    "user" : {pollCreator.DisplayName},
    "title" : {poll.Title}
}

For the last_event_type and last_event_user fields in poll objects and messages I know chose the first option. But for newly added users, we probably want to show the second syntax, so this would have to be handled client side? @sander-m @datwelk what do you think?

datwelk commented 8 years ago

:+1:

sander-m commented 8 years ago

:ship: