Skip to content

feat: Discord mesh bridge with live message forwarding#372

Open
SimmerV wants to merge 15 commits intoMeshAddicts:developfrom
SimmerV:feature-add
Open

feat: Discord mesh bridge with live message forwarding#372
SimmerV wants to merge 15 commits intoMeshAddicts:developfrom
SimmerV:feature-add

Conversation

@SimmerV
Copy link
Collaborator

@SimmerV SimmerV commented Mar 21, 2026

Summary

  • Live mesh-to-Discord message bridge via webhooks — each mesh node appears as a unique sender with its own name and avatar
  • Packet aggregation (5s window) with edit-in-place as additional gateways report
  • Gateway SNR/RSSI display grouped by hop count with deep links to node pages
  • Self-hosted static map endpoint (/v1/static-map) — renders OSM or Mapbox tiles server-side with disk caching, no external static map API dependency
  • Configurable map providers (none, osm, mapbox) with Mapbox preferred when token is valid, OSM fallback
  • 10 new slash commands: /linknode, /unlinknode, /mylinkednodes, /addtracker, /removetracker, /addballoon, /removeballoon, /bannode, /unbannode, /listtrackers, /listbans
  • /listtrackers and /listbans are mod-only commands with inline action buttons (remove/unban)
  • All commands accept hex ID, integer ID, shortname, or longname with DB-backed resolution
  • Enhanced /lookup — searches PostgreSQL, shows hardware, role, telemetry, position, and elsewhere links
  • Enhanced /mesh — pulls stats from DB with quick links to Dashboard, Nodes, Chat, Logs
  • Deep links throughout: packet IDs link to logs, gateway names link to node pages, position coordinates link to MeshInfo map, elsewhere links in lookups
  • 3 new DB tables: discord_node_links, discord_banned_nodes, discord_tracked_nodes
  • All persistent data exists in PostgreSQL, packet aggregation is ephemeral in-memory
  • Bounded event queue with backpressure to prevent unbounded memory growth
  • Async-wrapped static map generation to avoid blocking the event loop

@SimmerV SimmerV self-assigned this Mar 21, 2026
@SimmerV SimmerV added the enhancement New feature or request label Mar 21, 2026
@SimmerV SimmerV added this to meshinfo Mar 21, 2026
@github-project-automation github-project-automation bot moved this to Backlog in meshinfo Mar 21, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a live mesh-to-Discord bridge (webhook-based sender identities, gateway aggregation, rich embeds) plus Discord slash commands and PostgreSQL persistence to support linking/banning/tracking nodes.

Changes:

  • Introduces Discord bridge event flow (MQTT → in-memory queue → Discord webhook posts/edits) with rich text/position embeds.
  • Adds Discord slash commands for node linking and bridge moderation (ban + tracker/balloon).
  • Extends PostgreSQL schema and storage layer with new Discord bridge tables and helper queries.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
storage/db/postgres.py Adds query ordering and new DB helper methods for Discord bridge persistence (links/bans/tracking).
postgres/sql/schema.sql Creates new Discord bridge tables (links, banned nodes, tracked nodes).
mqtt.py Emits text/position events into an in-memory queue for the bridge.
memory_data_store.py Adds discord_event_queue for MQTT→Discord event transport.
config.toml.sample Documents new Discord bridge configuration options and channel mappings.
config.py Adds default config + validation for Discord bridge settings.
bot/embeds.py New embed builders for bridged text and position events (gateway grouping, deep links, map thumbnail).
bot/discord.py Registers new cogs (admin commands + bridge).
bot/cogs/mesh_bridge.py New MeshBridge cog that consumes queue events, aggregates, and posts/edits via webhooks.
bot/cogs/main_commands.py Enhances /lookup and /mesh with DB-backed lookups and richer output.
bot/cogs/admin_commands.py New slash commands for linking nodes and bridge moderation/tracking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SimmerV SimmerV moved this from Backlog to In progress in meshinfo Mar 26, 2026
@SimmerV SimmerV marked this pull request as ready for review March 26, 2026 02:08
@SimmerV SimmerV moved this from In progress to In review in meshinfo Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants