Skip to content

feat(telegram): rework message format and fix channel name resolution - #12

Open
alexkorotysh wants to merge 2 commits into
jf3tt:mainfrom
mesh-net-by:dev
Open

alexkorotysh wants to merge 2 commits into
jf3tt:mainfrom
mesh-net-by:dev

Conversation

@alexkorotysh

@alexkorotysh alexkorotysh commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reworks the Telegram bridge message layout and fixes channel names always
showing "LongFast", even for non-primary channels or when the mesh actually
uses a different preset.

Changes

  • New message format:
👤 Name (node id) - Channel
📶 Signal: SNR: X dB / RSSI: -X dBm

💬 Text: message

replacing the old Name → Channel / inline-metadata layout.

  • channelName() no longer hardcodes "LongFast" for channel 0 — it now
    falls back to "Primary" (channel 0) or "Ch N" (others) when no name is
    configured.
  • New telegram.channel_names config option (internal/config/config.go,
    documented in config.example.toml) lets you name channels shown in
    forwarded messages, e.g.:
  [telegram.channel_names]
  0 = "MediumFast"
  1 = "Admin"

FYI

Intentionally skipped auto-detecting the channel name/preset from the node
via protobuf (parsing the config cache, LoRa modem preset, etc.) — that
would've added unnecessary complexity (pb/proto imports in the telegram
package, wiring configCache into Bot, live-config parsing). Went with a
simple manual telegram.channel_names mapping instead — good enough for
the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant