Git Product home page Git Product logo

Comments (4)

lukasza67 avatar lukasza67 commented on June 3, 2024

So I've solved the issue by doing the following quick fix:

In the end of Push/Notification->getBody() I simply added:

$request['priority'] = "high";

Now; you might want to consider extend this within your management getters/settes to make this a real feature.

This made my notifications go in warp speed no matter of the devices state (I use cordova).

image

Also for housekeeping purposes 😃 the naming of function getBody() in this class is contradictory as it clashes with setBody(..) and it is not exactly the same type of "body" these two are playing around with (I managed to figure this out when I tried manually to build the full payload array body but the setter function just manages the message body).

My Regards to all for the nice work with the API once again!

from php-fcm.

AndyGaskell avatar AndyGaskell commented on June 3, 2024

Hi @lukasza67
That's really useful to know, thanks, I didn't realised normal priority push messages were treated that way. I'll have a look at writing a getter and setter for this.
Re getBody v setBody, I see what you mean, if we can't fix this in a non breaking way we can adjust the docs to better explain it.

from php-fcm.

Philipp91 avatar Philipp91 commented on June 3, 2024

Re getBody v setBody, I see what you mean, if we can't fix this in a non breaking way we can adjust the docs to better explain it.

How about renaming getBody() to buildJsonRequest() and leaving behind a deprecated getBody() that just redirects and will be removed in the next major release?

from php-fcm.

Philipp91 avatar Philipp91 commented on June 3, 2024

I'd also need the priority. I believe I could put together a PR if that helps.

from php-fcm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.