From 243e114b1fa5d33d2b2b9d9e0c40e4fec3f1ddec Mon Sep 17 00:00:00 2001 From: Yu Ming Zhu Date: Aug 06 2021 07:48:47 +0000 Subject: protonmsg: cast body to text --- diff --git a/plugins/hub/protonmsg.py b/plugins/hub/protonmsg.py index bbf4df5..1198c25 100644 --- a/plugins/hub/protonmsg.py +++ b/plugins/hub/protonmsg.py @@ -347,7 +347,8 @@ def handle_db_msgs(urls, CONFIG): c.execute("DELETE FROM proton_queue WHERE created_ts < NOW() -'%s hours'::interval" % CONFIG.getint('queue', 'age', fallback=24)) query = QueryProcessor(tables=('proton_queue',), - columns=('id', 'address', 'props', 'body'), + columns=('id', 'address', 'props', 'body::TEXT'), + aliases=('id', 'address', 'props', 'body'), opts={'order': 'id', 'limit': limit}) msgs = list(query.execute()) if not msgs: