From: Edward Delaporte Date: Sun, 29 Mar 2026 16:16:11 +0000 (-0500) Subject: Fixup X-Git-Tag: 1.1.0~31 X-Git-Url: https://apps.delaporte.us/gitweb/matrix-shop-bot.git/commitdiff_plain/ca2db266cee4e01d5cb210e9c0963fba974b8ba0?hp=4ad2abf0c5f8cfd91217797946a4a67bca1c94cc Fixup --- 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