fix: v0.3.13 - Store and broadcast sent messages before radio send

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ppfeiffer 2026-02-16 18:00:42 +01:00
parent b0f6555bc2
commit 248ebbbc43
3 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## [0.3.13] - 2026-02-16
### Fixed
- Gesendete Nachrichten werden jetzt vor dem Radio-Send gespeichert und broadcastet
- Getrenntes Exception-Handling fuer DB-Store und Radio-Send
## [0.3.12] - 2026-02-16
### Fixed
- Eigene Nachrichten-Echos werden in _handle_packet gefiltert (keine Doppelspeicherung)

View file

@ -1,4 +1,4 @@
version: "0.3.12"
version: "0.3.13"
bot:
name: "MeshDD-Bot"

View file

@ -353,13 +353,17 @@ class MeshBot:
if i > 0:
await asyncio.sleep(3.0)
msg = f"[{i+1}/{total}] {part}" if total > 1 else part
# Store and broadcast first, then send via radio
try:
self.interface.sendText(msg, channelIndex=channel)
stored = await self.db.insert_message(my_id, "^all", channel, "TEXT_MESSAGE_APP", msg)
if self.ws_manager:
await self.ws_manager.broadcast("new_message", stored)
except Exception:
logger.exception("Error sending text")
logger.exception("Error storing sent message")
try:
self.interface.sendText(msg, channelIndex=channel)
except Exception:
logger.exception("Error sending text via radio")
@staticmethod
def _split_message(text: str, max_len: int) -> list[str]: