支持设备短按向家长留言

This commit is contained in:
HycJack
2026-05-09 11:49:22 +08:00
parent be4d276557
commit edd1a2c4c2
5 changed files with 131 additions and 30 deletions

View File

@@ -140,6 +140,8 @@ async def present_message_item(
) -> ChildConversationMessageItem:
item = row_to_message_item(row)
if item.content_type == 2 and item.media_file_key:
if item.media_file_key.startswith(("http://", "https://")):
return item
try:
item.media_file_key = await audio_storage.get_audio_url(item.media_file_key)
except MessageAudioStorageError: