Skip to content

Commit

Permalink
Simplify apns_token assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Mar 17, 2024
1 parent 5eb5955 commit 0447b20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions aioapns/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ async def send_notification(
("host", self.APNS_SERVER),
("apns-id", request.notification_id),
]
if request.apns_topic is not None:
apns_topic = request.apns_topic
else:
apns_topic = self.apns_topic
apns_topic = request.apns_topic or self.apns_topic
headers.append(("apns-topic", apns_topic))
if request.time_to_live is not None:
expiration = int(time.time()) + request.time_to_live
Expand Down

0 comments on commit 0447b20

Please sign in to comment.