🐛 修复无法获取使用拉格朗日接收的消息中图片的地址 (#614)

This commit is contained in:
ishkong 2023-12-06 16:55:09 +08:00 committed by GitHub
parent 9f58d5c46d
commit 8f77392ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -619,6 +619,8 @@ def convert_message(_msg: Any, message: List[Message], index: int):
logger.debug('[OB12图片]', _msg.data['file_id']) logger.debug('[OB12图片]', _msg.data['file_id'])
elif 'path' in _msg.data: elif 'path' in _msg.data:
message.append(Message('image', _msg.data['path'])) message.append(Message('image', _msg.data['path']))
elif 'file' in _msg.data and 'url' not in _msg.data:
message.append(Message('image', _msg.data['file']))
else: else:
message.append(Message('image', _msg.data['url'])) message.append(Message('image', _msg.data['url']))
elif _msg.type == 'at': elif _msg.type == 'at':