Fix: голосовые сообщения приходили как [вложение: UNSUPPORTED] - #2
Draft
erop39 wants to merge 4 commits into
Draft
Fix: голосовые сообщения приходили как [вложение: UNSUPPORTED]#2erop39 wants to merge 4 commits into
erop39 wants to merge 4 commits into
Conversation
Mute state in Max is stored in settings.chats, but on connect we only loaded the chats array from AUTH_SNAPSHOT. Chats muted via «без звука» were therefore unknown until a live NOTIF_CONFIG arrived. - Load mute state from both chats[] and settings.chats on snapshot - Raise chatsCount from 10 to 40 and request full sync params - Handle alternate NOTIF_CHAT / NOTIF_CONFIG payload shapes - Add integration tests for skip-muted filtering Co-authored-by: eGoR <erop39@users.noreply.github.com>
AUTH_SNAPSHOT often does not include settings.chats with dontDisturbUntil. NOTIF_CONFIG (134) only sends a config hash, not mute data. - Request settings with opcode 22 using snapshot hash after connect - Refresh mute state when NOTIF_CONFIG arrives - Warn in logs when mute list is still empty after CONFIG fetch Co-authored-by: eGoR <erop39@users.noreply.github.com>
When SKIP_MUTED=true, first-connect message includes: «🔇 из них без звука: N» Co-authored-by: eGoR <erop39@users.noreply.github.com>
Max voice notes use _type UNSUPPORTED or AUDIO with a token, not a direct url. Resolve download URL via AUDIO_PLAY (301) or GET_FILE_URL with token, then forward as Telegram voice. Co-authored-by: eGoR <erop39@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Проблема
Голосовые из Max пересылались в Telegram как
[вложение: UNSUPPORTED].Причина
_type: UNSUPPORTED(илиAUDIO), а не с прямой ссылкойurl.token(иногдаaudioId,duration,wave).AUDIO+url— для голосовых это не срабатывало.Исправление
AUDIO,VOICE,UNSUPPORTEDс token/duration/waveAUDIO_PLAY(opcode 301) по token/audioIdGET_FILE_URL(88) по token как fallbackПроверка на VPS
cd /opt/max2tg sudo -u max2tg git fetch origin cursor/fix-audio-voice-ec4d sudo -u max2tg git checkout cursor/fix-audio-voice-ec4d sudo -u max2tg git pull sudo systemctl restart max2tgПопросите прислать голосовое — в Telegram должно прийти аудио, в логах:
Resolved audio URL via AUDIO_PLAY token