From 256b7c63bb988cab8a66b753f480b229dbadd987 Mon Sep 17 00:00:00 2001 From: Yu Ming Zhu Date: Jul 10 2021 07:29:29 +0000 Subject: protonmsg: cast body to text --- diff --git a/plugins/hub/protonmsg.py b/plugins/hub/protonmsg.py index 3fc62b0..c4f6409 100644 --- a/plugins/hub/protonmsg.py +++ b/plugins/hub/protonmsg.py @@ -345,7 +345,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: