Commit 98dbaf27 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Fix chat music scan crashing with "'str' object has no attribute 'value'"

get_chat_music() called search_messages(filter="audio") - a plain
string - but Pyrogram's filter param is a MessagesFilter enum and
internally reads filter.value, so every chat scan crashed the moment
a user tapped a chat. Use MessagesFilter.AUDIO instead. Added a unit
test that mocks pyrogram.Client and asserts the exact enum is passed,
since the existing router tests only mocked get_chat_music() itself
and never exercised this line.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 0414a226
Pipeline #1107 passed with stage
in 12 minutes and 33 seconds