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.
This commit is contained in:
mathieui 2025-02-09 16:14:08 +01:00
parent 0de9df92c4
commit 3de8ee97b5
No known key found for this signature in database
GPG Key ID: C59F84CEEFD616E3

View File

@ -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']