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

Add push notifications #43

Closed
jtubert opened this issue Nov 4, 2013 · 7 comments
Closed

Add push notifications #43

jtubert opened this issue Nov 4, 2013 · 7 comments
Milestone

Comments

@jtubert
Copy link
Owner

jtubert commented Nov 4, 2013

User should receive a notification each time their photo is double exposed.

@jtubert
Copy link
Owner Author

jtubert commented Nov 9, 2013

This is done. Basically each user subrcribes to a channel with their user ID. So each time one of their photo is double exposed the app send a notification to that channel.

var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.equalTo('deviceType', 'ios');
pushQuery.equalTo('channels', user.id);

    //console.log("user.objectId: "+user.id);

    Parse.Push.send({
        where: pushQuery, // Set our Installation query
        data: {
            alert: "Your photo was overexposed! "+ url
        }
        }, {
        success: function() {
            // Push was successful
        },
        error: function(error) {
            throw "Got an error " + error.code + " : " + error.message;
        }
    });

@ghost ghost assigned jtubert Nov 17, 2013
@amintorres
Copy link
Contributor

This is great John.
If possible let's modify the message the user gets to be a bit more informative:

Your photo was overexposed by [username of the other photographer] from [location of other photographer]
The whole thing should link to the photo url.

So the user will see a message like this;

Your photo was exposed by John T from Forest Hills, New York.
Ideally it would be even better if the location was more abstracted so:
Your photo was exposed by John T from Queens, NY.

This way the user’s privacy is more protected.

If the user did not share a location then:
Your photo was exposed by John T. (User did not share location)
Or simply:
Your photo was exposed by John T.

@jtubert
Copy link
Owner Author

jtubert commented Nov 23, 2013

photo

I added some more info but to add the location I need to figure out how to add the reverse geolocation on cloud code.

@amintorres
Copy link
Contributor

Looks fucking awesome :)

@jtubert
Copy link
Owner Author

jtubert commented Nov 23, 2013

photo
That was nothing, check this out :)

@ghost ghost assigned amintorres Nov 23, 2013
@amintorres
Copy link
Contributor

hehe, what a show off ;)

@amintorres
Copy link
Contributor

closing this, looks complete from my end. please re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants