feat: v0.3.14 - Change prefix to ?, wider channel select, send logging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da79daddc5
commit
cd4e31c63b
|
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.3.14] - 2026-02-16
|
||||||
|
### Changed
|
||||||
|
- Command-Prefix von "/" auf "?" geaendert
|
||||||
|
- Channel-Combobox in Sende-Card breiter (180px) fuer vollstaendige Channelnamen
|
||||||
|
- Debug-Logging in _send_text fuer Diagnose der Nachrichtenspeicherung
|
||||||
|
|
||||||
## [0.3.13] - 2026-02-16
|
## [0.3.13] - 2026-02-16
|
||||||
### Fixed
|
### Fixed
|
||||||
- Gesendete Nachrichten werden jetzt vor dem Radio-Send gespeichert und broadcastet
|
- Gesendete Nachrichten werden jetzt vor dem Radio-Send gespeichert und broadcastet
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
version: "0.3.13"
|
version: "0.3.14"
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
name: "MeshDD-Bot"
|
name: "MeshDD-Bot"
|
||||||
command_prefix: "/"
|
command_prefix: "?"
|
||||||
|
|
||||||
meshtastic:
|
meshtastic:
|
||||||
host: "192.168.11.11"
|
host: "192.168.11.11"
|
||||||
|
|
|
||||||
|
|
@ -344,8 +344,10 @@ class MeshBot:
|
||||||
|
|
||||||
async def _send_text(self, text: str, channel: int, max_len: int = 170):
|
async def _send_text(self, text: str, channel: int, max_len: int = 170):
|
||||||
if not self.interface:
|
if not self.interface:
|
||||||
|
logger.warning("_send_text: no interface, skipping")
|
||||||
return
|
return
|
||||||
my_id = self.get_my_node_id() or "bot"
|
my_id = self.get_my_node_id() or "bot"
|
||||||
|
logger.info("_send_text: from=%s channel=%d text=%s", my_id, channel, text[:50])
|
||||||
# Reserve space for "[x/y] " prefix (max 7 bytes)
|
# Reserve space for "[x/y] " prefix (max 7 bytes)
|
||||||
parts = self._split_message(text, max_len - 7)
|
parts = self._split_message(text, max_len - 7)
|
||||||
total = len(parts)
|
total = len(parts)
|
||||||
|
|
@ -356,8 +358,10 @@ class MeshBot:
|
||||||
# Store and broadcast first, then send via radio
|
# Store and broadcast first, then send via radio
|
||||||
try:
|
try:
|
||||||
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)
|
||||||
|
logger.info("_send_text: stored message id=%s", stored.get("id"))
|
||||||
if self.ws_manager:
|
if self.ws_manager:
|
||||||
await self.ws_manager.broadcast("new_message", stored)
|
await self.ws_manager.broadcast("new_message", stored)
|
||||||
|
logger.info("_send_text: broadcast done, clients=%d", len(self.ws_manager.clients))
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Error storing sent message")
|
logger.exception("Error storing sent message")
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
<div class="card-body py-2 px-2">
|
<div class="card-body py-2 px-2">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<span class="input-group-text"><i class="bi bi-send-fill"></i></span>
|
<span class="input-group-text"><i class="bi bi-send-fill"></i></span>
|
||||||
<select class="form-select form-select-sm" id="sendChannel" style="max-width:110px"></select>
|
<select class="form-select form-select-sm" id="sendChannel" style="max-width:180px"></select>
|
||||||
<input type="text" class="form-control form-control-sm" id="sendText" placeholder="Nachricht senden...">
|
<input type="text" class="form-control form-control-sm" id="sendText" placeholder="Nachricht senden...">
|
||||||
<button class="btn btn-success btn-sm" id="btnSend" type="button">Senden</button>
|
<button class="btn btn-success btn-sm" id="btnSend" type="button">Senden</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue