Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Use users app sound as default #58

Closed
ghost opened this Issue May 17, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@ghost

ghost commented May 17, 2014

Right now the default sound is set to PushoverSound. There is no way I can set it to the default sound from the android app. According to the api docs:

If no sound parameter is specified, the user's default tone will play. If the user has not chosen a custom sound, the standard Pushover sound will play.

So I guess $this->setSound(new PushoverSound); should be removed from the Message class: https://github.com/sqmk/Pushy/blob/master/library/Pushy/Message.php#L88

Not sure if that alone is enough. Maybe also line 58 in SendMessage should have a check: https://github.com/sqmk/Pushy/blob/master/library/Pushy/Command/SendMessage.php#L58

Probably something like: if ($this->message->getSound()) set sound. This way the sound parameter is not send if it is empty. But maybe it's not needed and only the first change is enough.

Owner

sqmk commented May 18, 2014

Understood. Not passing a sound to the API would play the default sound? I can probably add this pretty quickly.

@sqmk sqmk self-assigned this May 18, 2014

sqmk added a commit that referenced this issue Sep 28, 2014

Owner

sqmk commented Sep 28, 2014

This should now be complete.

@sqmk sqmk closed this Sep 28, 2014

@ghost

ghost commented Sep 29, 2014

Thank you. This seems to work as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment