From ca2db266cee4e01d5cb210e9c0963fba974b8ba0 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Sun, 29 Mar 2026 11:16:11 -0500 Subject: [PATCH 1/1] Fixup --- matrix_shop_bot/bot.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/matrix_shop_bot/bot.py b/matrix_shop_bot/bot.py index 12aaf79..5c8e6c5 100644 --- a/matrix_shop_bot/bot.py +++ b/matrix_shop_bot/bot.py @@ -65,8 +65,14 @@ async def do_shop(match): if match.command('assign'): store_id = int(match.args()[1]) item_id = int(match.args()[2]) - result = Data().assign_store(store_id, item_id) - return [result] + Data().assign_store(store_id, item_id) + + # Now print the list for the assigned store + items = Data().get_shopping_list(store_id) + results = ['Shopping List'] + for item in items: + results.append(str(item)) + return results if match.command('buy'): item_id = ' '.join(match.args()[1:]) @@ -86,6 +92,7 @@ async def do_shop(match): if match.command('list'): store_id = ' '.join(match.args()[1:]) items = Data().get_shopping_list(store_id) + results = ['Shopping List'] for item in items: results.append(str(item)) return results -- 2.47.3