From 3de8ee97b52b197186268288e952f5b074c896bd Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 9 Feb 2025 16:14:08 +0100 Subject: [PATCH] XEP-0050: make prev action possible when there is no next action (fixes #3516) Obviously the session has to allow for it, which must be modified in a handler. --- slixmpp/plugins/xep_0050/adhoc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/slixmpp/plugins/xep_0050/adhoc.py b/slixmpp/plugins/xep_0050/adhoc.py index 587fa3eb..bd01ed9a 100644 --- a/slixmpp/plugins/xep_0050/adhoc.py +++ b/slixmpp/plugins/xep_0050/adhoc.py @@ -326,7 +326,10 @@ class XEP_0050(BasePlugin): iq['command']['actions'] = actions iq['command']['status'] = 'executing' else: - iq['command']['actions'] = ['complete'] + actions = ['complete'] + if session['allow_prev']: + actions.append('prev') + iq['command']['actions'] = actions iq['command']['status'] = 'executing' iq['command']['notes'] = session['notes']