Banglejs : Improvement over notifications #344
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From specifications of notifications of gadgetbridge (https://www.espruino.com/Gadgetbridge), cmd can be
t:"call", cmd:"accept/incoming/outgoing/reject/start/end", name: "name", number: "+491234" - call
example shows :
GB({"t":"call","cmd":"incoming","name":"name","number":"+441234123123"})
Tried this way and incoming calls show on my bangle.js 2
I didn't check however how to accept or refuse calls...
Put an unique identifier.
Also, filter out messages which have an empty body and subject. Not convinced 100%, but something similar is done for instance for MiBandService::sendAlert
For me, it concerns mails which sends two notifications, the second with "courriel" (so in French) in the sender field, with empty subject and message.
I suppose it would be better to filter out those based on the event, but I do not master this part of code.