Infer push notification type from topic

Close #87
This commit is contained in:
Sergey Petrov
2019-10-03 00:45:49 +03:00
parent b3d9227740
commit 56d8bf2a88
3 changed files with 32 additions and 30 deletions
-4
View File
@@ -77,10 +77,6 @@ class Payload(object):
self.mutable_content = mutable_content
self.thread_id = thread_id
self.push_type = 'background'
if self.alert or self.badge is not None or self.sound is not None:
self.push_type = 'alert'
def dict(self) -> Dict[str, Any]:
result = {
'aps': {}