OpenKit / openkit-server

OpenKit Server
114 stars 35 forks source link

Non Hardcoded Push Messages for Challenges? #5

Open terhechte opened 10 years ago

terhechte commented 10 years ago

Hey, in challenge.rb, it says:

payload = {aps: {alert: "#{@sender.nick} just beat your #{leaderboard.name} score.", sound: "default"}, challenge_uuid: challenge_uuid}
        PushQueue.add(cert.pem_path, token.apns_token, payload, sandbox)

I think it would be great if the OpenKit API would allow to define the alert in the push request that's being send out by the API client. One reason why this hardcoding is troublesome is, of course, localisation, but another is that some games might want a different wording for their challenges to appear on the users home screen.

Just adding an optional "alert" key to the dictionary that is being submitted to the server (i.e. the params key in OKNetworker postToPath) would already suffice.