diff --git a/src/matrix_rssbot/classes/commands/addfeed.py b/src/matrix_rssbot/classes/commands/addfeed.py index 392f00b..16ab691 100644 --- a/src/matrix_rssbot/classes/commands/addfeed.py +++ b/src/matrix_rssbot/classes/commands/addfeed.py @@ -22,6 +22,8 @@ async def command_addfeed(room: MatrixRoom, event: RoomMessageText, bot): feeds.append(url) + feeds = list(set(feeds)) + try: feedparser.parse(url) except: diff --git a/src/matrix_rssbot/classes/commands/listfeeds.py b/src/matrix_rssbot/classes/commands/listfeeds.py index 6e73c82..4c6cb2b 100644 --- a/src/matrix_rssbot/classes/commands/listfeeds.py +++ b/src/matrix_rssbot/classes/commands/listfeeds.py @@ -11,6 +11,6 @@ async def command_listfeeds(room: MatrixRoom, event: RoomMessageText, bot): message = "This room is currently bridged to the following feeds:\n\n" for key, value in enumerate(state["content"]["feeds"]): - message += f"- {key}: {value}" + message += f"- {key}: {value}\n" await bot.send_message(room, message, True) \ No newline at end of file