diff --git a/aioapns/connection.py b/aioapns/connection.py index 9acd040..29ea310 100644 --- a/aioapns/connection.py +++ b/aioapns/connection.py @@ -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