Clear session['next'] if we are done
It will currently contain whatever it was last set to since the session value is persistent across steps, but the way to signal to slixmpp that we are done and it should send status=completed is to have next set to None, per https://codeberg.org/poezio/slixmpp/src/branch/master/slixmpp/plugins/xep_0050/adhoc.py#L317
This commit is contained in:
parent
e8d5f082d0
commit
93ae763db7
1 changed files with 1 additions and 8 deletions
|
@ -876,6 +876,7 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
|
|
||||||
|
|
||||||
async def _handle_import_complete(self, payload, session):
|
async def _handle_import_complete(self, payload, session):
|
||||||
|
session['next'] = None
|
||||||
url = payload['values']['url']
|
url = payload['values']['url']
|
||||||
if url.startswith('http') and url.endswith('.opml'):
|
if url.startswith('http') and url.endswith('.opml'):
|
||||||
jid = session['from'].bare
|
jid = session['from'].bare
|
||||||
|
@ -896,17 +897,9 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
except:
|
except:
|
||||||
session['notes'] = [['error', 'Import failed. Filetype does not appear to be an OPML file.']]
|
session['notes'] = [['error', 'Import failed. Filetype does not appear to be an OPML file.']]
|
||||||
session['has_next'] = False
|
session['has_next'] = False
|
||||||
|
|
||||||
# Mitigate Cheogram issue
|
|
||||||
# Gajim acts also strage, so this might be an issue with slixmmpp
|
|
||||||
# session['next'] = False
|
|
||||||
else:
|
else:
|
||||||
session['notes'] = [['error', 'Import aborted. Send URL of OPML file.']]
|
session['notes'] = [['error', 'Import aborted. Send URL of OPML file.']]
|
||||||
session['has_next'] = False
|
session['has_next'] = False
|
||||||
|
|
||||||
# Mitigate Cheogram issue
|
|
||||||
# Gajim acts also strage, so this might be an issue with slixmmpp
|
|
||||||
# session['next'] = False
|
|
||||||
return session
|
return session
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue