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

[Bug?]: send_forward_msg不能在群聊中正常显示图片 #319

Closed
4 tasks done
EvolvedGhost opened this issue Apr 16, 2024 · 4 comments
Closed
4 tasks done

[Bug?]: send_forward_msg不能在群聊中正常显示图片 #319

EvolvedGhost opened this issue Apr 16, 2024 · 4 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@EvolvedGhost
Copy link

EvolvedGhost commented Apr 16, 2024

请确保您已阅读以上注意事项,并勾选下方的确认框。

  • 我已经仔细阅读上述内容
  • 我已经使用 最新构建 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(其它疑问请考虑加入TG群询问或在discussions中提问)

Lagrange项目

OneBot

所使用/依赖的Lagrange项目对应的commit

0795d62

运行环境

Linux

运行架构

x64

连接方式

正向 WebSocket

重现步骤

在合并消息构建中使用Base64图片

期望的结果是什么?

正常发送Base64图片

实际的结果是什么?

图片无法显示

简单的复现代码/链接(可选)

向Lagrange发送:

发送:

{
    "action": "send_forward_msg",
    "params": {
        "messages": [
            {
                "type": "node",
                "data": {
                    "name": "TEST",
                    "uin": "${BOT_ID}",
                    "content": [
                        {
                            "type": "text",
                            "data": {
                                "text": "TEST\n"
                            }
                        },
                        {
                            "type": "image",
                            "data": {
                                "file": "base64://iVBORw0KGgoAAAANSUhEUgAAADYAAAAXCAYAAABAtbxOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAAHLSURBVFhH7Zg9zoJAEIYHb2BCJ40FFbEhMVa0lt5B4jW00HANvYOlFYkVjY0HsKHHG3yf77Jj1uVnSYQC4pMAM+xC5t3ZnUWtvxf0wrIsXHqPlEMjnIYiCrAWnHOJA0NkbIj8hPUN4xo7n8/k+770yrndbjQej2k6nco7RU6nE223W2Efj0daLpfCZh6PBwVBQGmayjvV7HY78Y46jBlDwFmWkeM44gC6jz4ICsGDy+XybscB4ZPJRLQhoPl8XmgHi8VCXPl5/X3s1w0g02gqbjYbaRXB6JmIoohs2xY2RD2fT2Ezq9VKWnnmwjCU3ifIOA+CCaMwZCdJEukVQQbQpw48rwaPEdeDR8Y9z6M4juWdcjBInP06jMLUgKqo6wPhPMUAMgL2+z1dr1dhM+jL67AKDFJVRlU6qYooDCgCOPQigUFgccgc+ugC26ATYWrxgK2DaYc2nsIQeL/fhd0WnQhTwbSpWqOz2exdfFBZm0yxpnQujOF9h68M/LKsfkurwnjt6CATXO5d1/0oJiq66G9o/HV/OBxovV5LL0f9mjB9oWD/QeFAoSjbYNV3gbJ+WJdN+f1s6Rs/YX1jxH9+DAloEhkbkrhcC9E/xHjHlbDG4moAAAAASUVORK5CYII="
                            }
                        }
                    ]
                },
                "time": 171330000
            }
        ]
    },
    "echo": 10010
}

获取到:

{
    "status": "ok",
    "retcode": 0,
    "data": "${SOME_DATA}",
    "echo": 10010
}

继续发送:

{
    "action": "send_group_msg",
    "params": {
        "group_id": ${GROUP_ID},
        "message": [
            {
                "type": "forward",
                "data": {
                    "id": "${SOME_DATA}"
                }
            }
        ],
        "auto_escape": false
    },
    "echo": 10011
}

获取到:

{
    "status": "ok",
    "retcode": 0,
    "data": {
        "message_id": ${MSG_ID}
    },
    "echo": 10011
}

实际效果:
82c0f79c73df9913eca9434301ec6f7

日志记录(可选)

No response

补充说明(可选)

目前好像send_group_forward_msg能正常处理Base64图片,不知道是这样设计的还是send_forward_msg方式本身不能发图片

@EvolvedGhost EvolvedGhost added the bug? Maybe it's a bug label Apr 16, 2024
@shijinn520
Copy link

刚在别的群跟几位大佬聊了下,这个问题应该是发到群的图片是私聊类型,但是rkey拿的是群聊的,导致了图裂

@EvolvedGhost
Copy link
Author

刚在别的群跟几位大佬聊了下,这个问题应该是发到群的图片是私聊类型,但是rkey拿的是群聊的,导致了图裂

那感觉应该是send_forward_msg方式还是不够全,毕竟onebot标准没有定义这个东西,gocq和shamrock也只区分了send_group_forward_msgsend_private_forward_msg,感觉可能应该把这个删掉

@EvolvedGhost EvolvedGhost changed the title [Bug?]: send_forward_msg不能正常处理Base64图片 [Bug?]: send_forward_msg不能在群聊中正常显示图片 Apr 18, 2024
@BennettChina
Copy link

刚在别的群跟几位大佬聊了下,这个问题应该是发到群的图片是私聊类型,但是rkey拿的是群聊的,导致了图裂

那感觉应该是send_forward_msg方式还是不够全,毕竟onebot标准没有定义这个东西,gocq和shamrock也只区分了send_group_forward_msgsend_private_forward_msg,感觉可能应该把这个删掉

其实 OneBot 定义了这个东西,在 合并转发自定义节点 这里写的,segment 里定义的标记了发的消息段都是可以通过发送消息三个action API发送的,go-cq可能实现的比较早所以以扩展的方式去实现了,这边按理来说应该以标准的方式去实现的。

@pk5ls20 pk5ls20 added bug Something isn't working help wanted Extra attention is needed bug? Maybe it's a bug and removed bug? Maybe it's a bug labels Sep 12, 2024
@DarkRRb
Copy link
Contributor

DarkRRb commented Sep 18, 2024

因为 Lagrange 没法预测 send_forward_msg 得到的转发消息最终会发向哪里

相关方案讨论中

请先使用 send_group_forward_msgsend_private_forward_msg

@pk5ls20 pk5ls20 pinned this issue Sep 18, 2024
@DarkRRb DarkRRb added wontfix This will not be worked on and removed help wanted Extra attention is needed bug? Maybe it's a bug labels Sep 27, 2024
@ishkong ishkong closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants