Add ability to set number of immediate sent updates

This commit is contained in:
Schimon Jehudah 2024-02-23 14:25:56 +00:00
parent e2652760bc
commit 7d45a3249a
2 changed files with 9 additions and 15 deletions

View file

@ -1,2 +1,2 @@
__version__ = '0.1.18'
__version_info__ = (0, 1, 18)
__version__ = '0.1.19'
__version_info__ = (0, 1, 19)

View file

@ -788,19 +788,13 @@ async def message(self, message):
await config.set_setting_value(db_file, key, val)
response = 'Only new items of newly added feeds be delivered.'
XmppMessage.send_reply(self, message, response)
# TODO Will you add support for number of messages?
case 'next':
# num = message_text[5:]
# await task.send_update(self, jid, num)
case _ if message_lowercase.startswith('next'):
num = message_text[5:]
if num:
await action.xmpp_send_update(self, jid, num)
else:
await action.xmpp_send_update(self, jid)
# task.clean_tasks_xmpp(self, jid, ['interval', 'status'])
# await task.start_tasks_xmpp(self, jid, ['status', 'interval'])
# await refresh_task(self, jid, send_update, 'interval', num)
# await refresh_task(self, jid, send_status, 'status', 20)
# await refresh_task(jid, key, val)
await task.start_tasks_xmpp(self, jid, ['status'])
case 'old':
db_file = config.get_pathname_to_database(jid_file)
key = 'old'