Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

feat: temporarily allow aps data via registration message #896

Merged
merged 1 commit into from
May 15, 2017
Merged

Conversation

jrconlin
Copy link
Member

closes #887

@codecov-io
Copy link

codecov-io commented May 15, 2017

Codecov Report

Merging #896 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #896     +/-   ##
========================================
  Coverage     100%    100%             
========================================
  Files          54      55      +1     
  Lines        9780   11172   +1392     
========================================
+ Hits         9780   11172   +1392
Impacted Files Coverage Δ
autopush/tests/test_router.py 100% <100%> (ø) ⬆️
autopush/router/apnsrouter.py 100% <100%> (ø) ⬆️
autopush/router/simple.py 100% <0%> (ø) ⬆️
autopush/websocket.py 100% <0%> (ø) ⬆️
autopush/tests/test_websocket.py 100% <0%> (ø) ⬆️
autopush/tests/test_integration.py 100% <0%> (ø) ⬆️
autopush/base.py 100% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40b45bc...4d60b07. Read the comment docs.

@jrconlin jrconlin requested review from bbangert and pjenvey May 15, 2017 18:47
@@ -133,7 +133,7 @@ def _route(self, notification, router_data):
payload["cryptokey"] = notification.headers["crypto_key"]
elif "encryption_key" in notification.headers:
payload["enckey"] = notification.headers["encryption_key"]
payload['aps'] = {"content-available": 1}
payload['aps'] = router_data.get('aps', {"content-available": 1})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's an aps entry, then content-available doesn't need to be present?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
There needs to be an "aps" block, thus why I default to "{content-available": 1}, however, 'content-available is equivalent to our silent notifications, so it can be problematic. I presume that the folks providing the override aps data are knowledgeable and allow for full customization.

@jrconlin jrconlin merged commit d265b66 into master May 15, 2017
@jrconlin jrconlin deleted the feat/887 branch June 8, 2017 22:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow ios registration messages to provide optional 'aps' configuration
4 participants