Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Conversation

@AnonymeMeow
Copy link
Contributor

This PR parses the summary field of NotOnlineImage and CustomFace. This enables distinguishing between a regular image and a custom emoticon.

群聊中的图片会被当作CustomFace解析,私聊中的图片则会被当作NotOnlineImage解析。当图片为表情包时,消息的Summary会被解析为'[动画表情]',否则QQ服务端就会发送空的Summary字段,既为''(空字符串)。ImageEntitySummary保留了原始解析出来的数据。

为了更加符合QQ客户端实际显示预览的情况,ImageEntityToPreviewText()方法在Summary不为null且不为''时返回Summary,否则返回'[图片]'

@ghost ghost requested a review from CrackTC April 12, 2024 02:03
Copy link
Collaborator

@CrackTC CrackTC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roughly tested and it looks good, forgive these minor changes I've requested

@AnonymeMeow AnonymeMeow force-pushed the ImageSummary branch 3 times, most recently from 8f96f7b to c6824a9 Compare April 12, 2024 10:51
@AnonymeMeow
Copy link
Contributor Author

Sorry, some of the previous commits were not signed, so I had to re-commit them all to sign them.

@CrackTC CrackTC merged commit 5369aaa into LagrangeDev:master Apr 12, 2024
@AnonymeMeow AnonymeMeow deleted the ImageSummary branch April 12, 2024 11:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants