Coder Social home page Coder Social logo

Problem with Title-loc-args about pushok HOT 5 CLOSED

edamov avatar edamov commented on June 15, 2024
Problem with Title-loc-args

from pushok.

Comments (5)

edamov avatar edamov commented on June 15, 2024

Hi @eiosca.

Thanks for issue. I think it's the bug in the library, because the official documentation says the request should be like this:

{
    "aps" : {
        "alert" : {
            "loc-key" : "GAME_PLAY_REQUEST_FORMAT",
            "loc-args" : [ "Jenna", "Frank"]
        }
    }
}

from pushok.

edwardmp avatar edwardmp commented on June 15, 2024

@edamov
Thanks for making this! This bug seems to be solvable by just changing the key constants for loc-key and loc-args in Alert.php, right? If so just respond and I'll file a pull request.

from pushok.

edamov avatar edamov commented on June 15, 2024

The first problem is about naming: loc-key should be instead of title-loc-key. The same with loc-args.
And the second problem is about value of loc-args: it should be [ "Jenna", "Frank"] instead of {"0":"Jenna", "1":"Frank"}

from pushok.

edwardmp avatar edwardmp commented on June 15, 2024

Thanks, that's what I meant. PR submitted for first problem.

Second problem, is this really still there as there are already tests in AlertTest.php that confirm the expected behavior is present?

from pushok.

nickasd avatar nickasd commented on June 15, 2024

This issue has not been completely solved, I still get this problem mentioned by @edamov:

And the second problem is about value of loc-args: it should be [ "Jenna", "Frank"] instead of {"0":"Jenna", "1":"Frank"}

I could solve it by removing JSON_FORCE_OBJECT from the argument list in Payload.php on line 278, but I'm not sure if this will break something else. Could you please have a look at this?

from pushok.

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.