Priority parameter for Notify My Android messages

Hello,

The current code sends all NMA notifications with a priority of 0. I would like to be able to set the priority so I have replaced this line in my nma.py:

'priority': 0,

with

'priority': kwargs.get('data').get('priority', '0'),

Thus I can send a message with priority like this:

data:
  message: x
  title: y
  data:
    priority: 2

Since data seems to always be included the code should not throw errors, but I’m not sure what the common design practices should be for a change like that, so I was wondering if someone with more knowledge could include this functionality in the main codebase.

1 Like

Thanks for sharing, it helped me!!

Have you found a solution to pass additional parameter to NMA like priority or content/type or whatever?

As mentioned in my first post I manually replaced a line in the source code for NMA. This allows priority to be sent, but it has to be done manually every time the code is updated. I was hoping someone would submit a pull request with that code because I don’t have time to do all the required things for that. I don’t know about content type though.

Yes, in fact my following pass will be to replace NMA component with a simple REST call to the NMA API.