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:
parent
b0f6555bc2
commit
248ebbbc43
|
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# 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
|
## [0.3.12] - 2026-02-16
|
||||||
### Fixed
|
### Fixed
|
||||||
- Eigene Nachrichten-Echos werden in _handle_packet gefiltert (keine Doppelspeicherung)
|
- Eigene Nachrichten-Echos werden in _handle_packet gefiltert (keine Doppelspeicherung)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
version: "0.3.12"
|
version: "0.3.13"
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
name: "MeshDD-Bot"
|
name: "MeshDD-Bot"
|
||||||
|
|
|
||||||
|
|
@ -353,13 +353,17 @@ class MeshBot:
|
||||||
if i > 0:
|
if i > 0:
|
||||||
await asyncio.sleep(3.0)
|
await asyncio.sleep(3.0)
|
||||||
msg = f"[{i+1}/{total}] {part}" if total > 1 else part
|
msg = f"[{i+1}/{total}] {part}" if total > 1 else part
|
||||||
|
# Store and broadcast first, then send via radio
|
||||||
try:
|
try:
|
||||||
self.interface.sendText(msg, channelIndex=channel)
|
|
||||||
stored = await self.db.insert_message(my_id, "^all", channel, "TEXT_MESSAGE_APP", msg)
|
stored = await self.db.insert_message(my_id, "^all", channel, "TEXT_MESSAGE_APP", msg)
|
||||||
if self.ws_manager:
|
if self.ws_manager:
|
||||||
await self.ws_manager.broadcast("new_message", stored)
|
await self.ws_manager.broadcast("new_message", stored)
|
||||||
except Exception:
|
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
|
@staticmethod
|
||||||
def _split_message(text: str, max_len: int) -> list[str]:
|
def _split_message(text: str, max_len: int) -> list[str]:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue