mirror of
https://github.com/BEARlogin/max-telegram-bridge-bot.git
synced 2026-04-26 10:50:57 +00:00
Fix: video-without-caption TG→MAX rejected as send-message.empty
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
v0.3.14 started sending format="markdown" for every TG→MAX forward (including crossposts). For media-only posts (video without caption, etc.) text ends up empty and MAX API rejects the payload with 400 proto.payload errors.send-message.empty because format is set but no text is present. sendMaxDirectFormatted now drops format when text is "". This also unsticks queued items that were retrying forever with the same 400. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8b80bb8ff1
commit
77fa94914f
1 changed files with 4 additions and 0 deletions
|
|
@ -248,6 +248,10 @@ func (b *Bridge) sendMaxDirectFormatted(ctx context.Context, chatID int64, text
|
|||
} `json:"link,omitempty"`
|
||||
}
|
||||
|
||||
// format применяется только к тексту — при пустом тексте MAX отклоняет payload.
|
||||
if text == "" {
|
||||
format = ""
|
||||
}
|
||||
body := msgBody{Text: text, Format: format}
|
||||
if attType != "" && token != "" {
|
||||
body.Attachments = []attachment{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue