Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

fixed redundant telegram calls

Alishahryar18aae7c3d3d82
diff --git a/messaging/handler.py b/messaging/handler.py
index 674002ae..f299cc04 100644
--- a/messaging/handler.py
+++ b/messaging/handler.py
@@ -174,6 +174,7 @@ class ClaudeMessageHandler:
}
last_ui_update = 0.0
+ last_displayed_text = None
captured_session_id = None
temp_session_id = None
@@ -185,7 +186,7 @@ class ClaudeMessageHandler:
logger.info(f"Will fork from parent session: {parent_session_id}")
async def update_ui(status: Optional[str] = None, force: bool = False) -> None:
- nonlocal last_ui_update
+ nonlocal last_ui_update, last_displayed_text
now = time.time()
# Small 1s debounce for UI sanity - we still want to avoid
@@ -195,7 +196,8 @@ class ClaudeMessageHandler:
last_ui_update = now
display = self._build_message(components, status)
- if display:
+ if display and display != last_displayed_text:
+ last_displayed_text = display
# Use queued edit for non-blocking, thread-safe UI updates
# Rate limiting and flood wait retries are handled by GlobalRateLimiter
await self.platform.queue_edit_message(
diff --git a/messaging/telegram.py b/messaging/telegram.py
index 45524a82..5ecfd80d 100644
--- a/messaging/telegram.py
+++ b/messaging/telegram.py
@@ -159,6 +159,8 @@ class TelegramPlatform(MessagingPlatform):
try:
return await func(*args, **kwargs)
except (NetworkError, asyncio.TimeoutError) as e:
+ if "Message is not modified" in str(e):
+ return None
last_error = e
if attempt < max_retries - 1:
wait_time = 2**attempt # 1s, 2s, 4s