diff --git a/telegram/bot.py b/telegram/bot.py index 97e7435..a841df7 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -1660,12 +1660,6 @@ def _group_into_windows(messages: list[dict], window_seconds: int = 300) -> list if not messages: return [] - # Group by chat_id first - by_chat: dict[int, list[dict]] = {} - for msg in messages: - chat_id = msg.get("chat_id", 0) - by_chat.setdefault(chat_id, []).append(msg) - # Group by chat_id first by_chat: dict[int, list[dict]] = {} for msg in messages: @@ -1693,7 +1687,6 @@ def _group_into_windows(messages: list[dict], window_seconds: int = 300) -> list else: current_window.append(msg) - if current_window: windows.append(current_window)