diff --git a/platypush/backend/mqtt.py b/platypush/backend/mqtt.py index 126ac7d4..c0d25030 100644 --- a/platypush/backend/mqtt.py +++ b/platypush/backend/mqtt.py @@ -34,6 +34,11 @@ class MqttBackend(Backend): def send_message(self, msg): + try: + msg = json.loads(msg) + except: + pass + publisher.single(self.topic, str(msg), hostname=self.host, port=self.port)