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

Id发送图片无法正常显示 #1769

Closed
SugarFatFree opened this issue Dec 28, 2021 · 5 comments
Closed

Id发送图片无法正常显示 #1769

SugarFatFree opened this issue Dec 28, 2021 · 5 comments
Labels
M 优先级: 主要 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关
Milestone

Comments

@SugarFatFree
Copy link

SugarFatFree commented Dec 28, 2021

问题描述

通过id发送的图片在群里无法正常显示,私聊没问题

复现

try (
                ExternalResource externalResource = ExternalResource.create(data)
        ) {
            Image image;
            if (Image.isUploaded(getBot(), externalResource.getMd5(), data.length)) {
                image = Image.fromId(externalResource.calculateResourceId());
            } else {
                image = ExternalResource.uploadAsImage(externalResource, getEvent().getSubject());
            }
            return image;
        } catch (Exception e) {
            log.error("图片数据上传失败!:{}", e);
        }
        return null;

mirai-core 版本

2.9.0

bot-protocol

ANDROID_PHONE

其他组件版本

No response

系统日志

�[0m2021-12-28 17:38:15 V/Net 3045455958: [乄灬汐丶の领域(173377825)] 大家族-零曲(1240050829) -> 小汐,来十张美图�[0m
�[0m2021-12-28 17:38:15 V/Net 3045455958: Group(173377825) <- [mirai:at:1240050829] 正在获取图片,请稍后...�[0m
�[0m2021-12-28 17:38:46 V/Net 3045455958: Group(173377825) <- ForwardMessage(preview=[小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片], 小汐: [图片]], title=群聊的聊天记录, brief=[聊天记录], source=聊天记录, summary=查看10条转发消息, nodeList=[Node(senderId=3045455958, time=1640684316, senderName=小汐, messageChain=[mirai:image:{FBF43886-2DC9-5222-EF3F-1911E01305D7}.jpg]), Node(senderId=3045455958, time=1640684317, senderName=小汐, messageChain=[mirai:image:{6BD34AB9-320E-E8B4-8FC7-AD5A2334889E}.jpg]), Node(senderId=3045455958, time=1640684318, senderName=小汐, messageChain=[mirai:image:{CFF593FB-4E67-3A20-1F03-4207A337F957}.jpg]), Node(senderId=3045455958, time=1640684319, senderName=小汐, messageChain=[mirai:image:{E82D3032-9568-A5F1-6FD2-A04EEED5B5A9}.jpg]), Node(senderId=3045455958, time=1640684320, senderName=小汐, messageChain=[mirai:image:{F0813F7E-9C85-AF92-D221-A1977069E60D}.jpg]), Node(senderId=3045455958, time=1640684321, senderName=小汐, messageChain=[mirai:image:{373E9A51-B347-6D0F-5E41-979EBBB0704B}.jpg]), Node(senderId=3045455958, time=1640684322, senderName=小汐, messageChain=[mirai:image:{759DA9CD-BCD3-8B97-54C7-80149489EB2C}.jpg]), Node(senderId=3045455958, time=1640684323, senderName=小汐, messageChain=[mirai:image:{91784CBE-2862-6E7E-CC3C-CFF5EC1F1B88}.jpg]), Node(senderId=3045455958, time=1640684324, senderName=小汐, messageChain=[mirai:image:{B528C0D9-9E42-FAD9-2922-EBF8EA31E5D4}.jpg]), Node(senderId=3045455958, time=1640684325, senderName=小汐, messageChain=[mirai:image:{1A3E4EA0-28DE-43B6-D68C-09F09A49CC43}.jpg])])�[0m

网络日志

补充信息

No response

@SugarFatFree SugarFatFree added the x:question 标签: 需要更多信息 label Dec 28, 2021
@Karlatemp
Copy link
Member

  1. Use Image.builder
  2. 既然都已经拿到数据内容了为什么还要自行处理而不是交给core内部处理

@Karlatemp Karlatemp added the z:wait-for-reply 状态: 等待回复 label Dec 28, 2021
@MagnoliaFly
Copy link

我也一模一样的问题,希望可以早点修复

@SugarFatFree
Copy link
Author

  1. Use Image.builder
  2. 既然都已经拿到数据内容了为什么还要自行处理而不是交给core内部处理

用这个方法试了,还是不行,通过Id发送的图片日志显示正常发送,群内无法看到,普通上传图片没有问题

@Fallen-ice
Copy link

我也有此问题

@Karlatemp Karlatemp added M 优先级: 主要 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关 and removed x:question 标签: 需要更多信息 z:wait-for-reply 状态: 等待回复 labels Dec 29, 2021
@Karlatemp Karlatemp added this to the 2.10.0-RC milestone Dec 29, 2021
@mckuhei
Copy link
Contributor

mckuhei commented Dec 30, 2021

我每次重新上传倒是没问题,版本2.7.1

@Karlatemp Karlatemp moved this to Done in 2.10.0-RC Dec 30, 2021
Karlatemp added a commit that referenced this issue Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M 优先级: 主要 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关
Projects
Status: Done
Development

No branches or pull requests

5 participants