🐛 修复telegram重复发送消息的问题 (#483)

* 修复ntchat消息解析和reply获取失败

* 增加re依赖

* 修复re匹配bug

* 🚨 `pre-commit-ci`修复格式错误

* 去除不必要的replace

* 修复telegram重复发送的问题

* 暂时忽略Telegram mention的报错问题

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Small_yu 2023-04-03 23:23:10 +08:00 committed by GitHub
parent 20568a1ae4
commit d727d80a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -250,5 +250,6 @@ def convert_message(_msg: Any, message: List[Message]):
else:
message.append(Message('reply', _msg.data['id']))
elif _msg.type == 'mention':
message.append(Message('at', _msg.data['user_id']))
if 'user_id' in _msg.data:
message.append(Message('at', _msg.data['user_id']))
return message

View File

@ -500,7 +500,6 @@ async def telegram_send(
await _send(_msg['data'], None)
else:
await _send(content, image)
await _send(content, image)
async def feishu_send(