From f7236b1e7e5629382a7b924ec6e18a5601e501ef Mon Sep 17 00:00:00 2001 From: simonkagwi Date: Thu, 14 Nov 2024 22:13:24 +0300 Subject: [PATCH] Update src/smpp_gateway/router.py Co-authored-by: Tobias McNulty --- src/smpp_gateway/router.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/smpp_gateway/router.py b/src/smpp_gateway/router.py index 7a4e58d..115d2f2 100644 --- a/src/smpp_gateway/router.py +++ b/src/smpp_gateway/router.py @@ -32,10 +32,12 @@ class PriorityBlockingRouter(BlockingRouter): outgoing_message_class = PriorityOutgoingMessage def new_incoming_message( - self, text, connections, class_=incoming_message_class, **kwargs + self, text, connections, class_=None, **kwargs ): - return super().new_incoming_message( - text, connections, class_=PriorityIncomingMessage, **kwargs + if class_ is None: + class_ = self.incoming_message_class + self.return super().new_incoming_message( + text, connections, class_=class_, **kwargs ) def new_outgoing_message(