From d410ef8ab3bd1432aa024ed3fd43343dd6205997 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 13 Feb 2024 15:26:05 -0500 Subject: [PATCH] Use note of type=error to signal an error --- slixfeed/xmpp/client.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/slixfeed/xmpp/client.py b/slixfeed/xmpp/client.py index a3fecc4..f78845c 100644 --- a/slixfeed/xmpp/client.py +++ b/slixfeed/xmpp/client.py @@ -773,6 +773,7 @@ class Slixfeed(slixmpp.ClientXMPP): options.addOption(conference['name'], conference['jid']) session['next'] = self._handle_bookmarks_editor session['has_next'] = True + session['payload'] = form else: logging.warning('An unauthorized attempt to access bookmarks has ' 'been detected!\n' @@ -780,16 +781,7 @@ class Slixfeed(slixmpp.ClientXMPP): ' Jabber ID: {}\n' ' Timestamp: {}\n' .format(jid, timestamp())) - form = self['xep_0004'].make_form('form', 'Denied') - # form = self['xep_0004'].make_form('error', 'Denied') # Cheogram crashes - form['instructions'] = '⚠️ Access denied' - form.add_field(var='warning', - ftype='fixed', - label='Warning', - value='You are not allowed to access this resource.') - session['next'] = False - session['has_next'] = False - session['payload'] = form + session['notes'] = [['error', 'You are not allowed to access this resource.']] return session