From 793b8f84954ee0a1bdc4e90bd8281a2049b79ef4 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Mon, 23 Sep 2024 01:46:01 -0700 Subject: [PATCH] Update mesh_bot.py --- mesh_bot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index 3d5552a..22fc78f 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -526,12 +526,10 @@ def handle_history(nodeid, deviceID, lheard=False): nodeName = get_name_from_number(cmdHistorySorted[i]['nodeID'], 'short', deviceID) if not any(d[0] == nodeName for d in buffer): buffer.append((nodeName, prettyTime)) - # truncate buffer list to 4 users if len(buffer) > 4: buffer = buffer[-4:] - - # format the buffer list into a string for display only return the last 4 users + # create the message from the buffer list for i in range(0, len(buffer)): msg += f"{buffer[i][0]} seen {buffer[i][1]} ago. "