mirror of
https://github.com/BEARlogin/max-telegram-bridge-bot.git
synced 2026-07-09 17:18:37 +00:00
Some checks are pending
Build / build (push) Waiting to run
Introduces a minimal Addon interface (Start, HandleDMCommand, HandleDMForward) wired into the bridge: - bridge.go: Bridge gains an addon field, started as a goroutine in Run when non-nil; loadAddon is provided per build configuration. - addon_stub.go (default build, //go:build !addon): loadAddon returns nil — the public binary has no addon and no extra behavior. - telegram.go: private-chat messages and channel forwards are offered to the addon first when present; if it handles them, the bridge skips its own processing. No-op in the public build. - TGSender.ForwardMessage(from, to, msgID, silent) added — a generic Bot API wrapper returning the full message; useful for any addon that needs to relay existing messages. The concrete addon implementation is compiled separately via the `addon` build tag and is not part of this repository. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 lines
178 B
Go
6 lines
178 B
Go
//go:build !addon
|
|
|
|
package main
|
|
|
|
// loadAddon — публичная сборка: расширения не подключены.
|
|
func loadAddon(b *Bridge) Addon { return nil }
|