Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove fatal clearance to message from QQWebhook #1026

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

7emotions
Copy link
Contributor

概述

如 Issues #1025 所描述的,在pkg/platform/sources/qqofficial.pyQQOfficialMessageConverter类的target2yiri方法中,对message进行了清除操作,导致后续解析出了空的Plain

    @staticmethod
    async def target2yiri(message:str,message_id:str,pic_url:str,content_type):
        yiri_msg_list = []
        yiri_msg_list.append(
            platform_message.Source(id=message_id,time=datetime.datetime.now())
        )
        if pic_url is not None:
            base64_url = await image.get_qq_official_image_base64(pic_url=pic_url,content_type=content_type)
            yiri_msg_list.append(
                platform_message.Image(base64=base64_url)
            )
        message = ''
        yiri_msg_list.append(platform_message.Plain(text=message))
        chain = platform_message.MessageChain(yiri_msg_list)
        return chain

检查清单

PR 作者完成

*请在方括号间写x以打勾

  • 阅读仓库贡献指引了吗?
  • 与项目所有者沟通过了吗?
  • 我确定已自行测试所作的更改,确保功能符合预期。

项目所有者完成

  • 相关 issues 链接了吗?
  • 配置项写好了吗?迁移写好了吗?生效了吗?
  • 依赖写到 requirements.txt 和 core/bootutils/deps.py 了吗
  • 文档编写了吗?

@RockChinQ RockChinQ requested a review from wangcham February 7, 2025 13:26
@wangcham wangcham merged commit c72ad2b into RockChinQ:master Feb 7, 2025
@wangcham
Copy link
Collaborator

wangcham commented Feb 7, 2025

感谢贡献!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants