From ec865993d511e074509b3e0d57edd6a4f366fb0e Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 17 Feb 2026 12:12:34 +0100 Subject: [PATCH] fixed notifications for multiple people on same map --- stoat_map_notifications/python/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stoat_map_notifications/python/main.py b/stoat_map_notifications/python/main.py index d5a03b1..88c0afc 100644 --- a/stoat_map_notifications/python/main.py +++ b/stoat_map_notifications/python/main.py @@ -177,11 +177,18 @@ def check_new_map_notification_status(fixed, last_msg_id): return valid_map_notification_cmds_add, valid_map_notification_cmds_remove, invalid_map_notification_cmds, last_msg_id, show_map_notifications def send_post_notify_message_to_stoat(list_of_people_to_notify, infomap): - #print('list_of_people_to_notify: ', list_of_people_to_notify) + list_of_people_to_notify = list_of_people_to_notify[0] message = f"Map changed to: {infomap}\n\n" + try: + list_of_people_to_notify = json.loads(list_of_people_to_notify) + except: + #in case it fails there should be nobody to notify + return + #print('list_of_people_to_notify: ', list_of_people_to_notify) for people in list_of_people_to_notify: if not people or people == "[]": continue people = people.replace('["', '').replace('"]', '') + #print('people: ', people) message += f"<@{people}> " if not message.endswith("\n"): message += "\n"