From 86bec3402c4992b1c415404f7b320d818c23f9e5 Mon Sep 17 00:00:00 2001 From: Ruslan Bel'kov Date: Sat, 27 Apr 2024 23:54:16 +0300 Subject: [PATCH] fix: check if message id is not None instead of boolean casting --- src/socketio/packet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socketio/packet.py b/src/socketio/packet.py index 1830769..ec1b364 100644 --- a/src/socketio/packet.py +++ b/src/socketio/packet.py @@ -185,6 +185,6 @@ class Packet(object): 'data': self.data, 'nsp': self.namespace, } - if self.id: + if self.id is not None: d['id'] = self.id return d