Update slixfeed.py

This commit is contained in:
Schimon Jehudah 2022-06-30 16:21:22 +00:00
parent ba966c715f
commit e9dfb60c45

View file

@ -560,6 +560,15 @@ def list_subscriptions(conn):
#sql = "SELECT id, address FROM feeds" #sql = "SELECT id, address FROM feeds"
sql = "SELECT name, address, updated, id, status FROM feeds" sql = "SELECT name, address, updated, id, status FROM feeds"
results = cur.execute(sql) results = cur.execute(sql)
if results.fetchone() is None:
# TODO Print the Slixfeed's JID .format(self.jid)
msg = ("List of subscriptions is empty. \n"
"To add feed, send me a message as follows: \n"
"feed add URL \n"
"For example: \n"
"feed add https://reclaimthenet.org/feed/")
return msg
else:
feeds_list = "List of subscriptions: \n" feeds_list = "List of subscriptions: \n"
for result in results: for result in results:
#feeds_list = feeds_list + '\n {}. {}'.format(str(result[0]), str(result[1])) #feeds_list = feeds_list + '\n {}. {}'.format(str(result[0]), str(result[1]))