Skip to content

[Core] Fix Error Handling Super Emoticon #6

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kengwang
Copy link
Contributor

Motivation:

Lagrange will throw an error when trying to parse MessageElem in MentionEntity, says that:

Lagrange.Core.Exceptions.LagrangeException: An error occurred while processing the incoming event
 ---> System.Collections.Generic.KeyNotFoundException: Field 4 not found in ProtoObject.

Reproduce:

Send a super emoticon in chat.

image

obj only has one element that contains the fallback string.

a70e182b77c0312e59f15b739c2c3cb4

Fixes

Check if it has the corresponding index.

@Linwenxuan04
Copy link
Contributor

其实通过有没有4这个Field来判断不太靠谱 具体的逻辑因为NTQQ现在虚的太厉害了还没有逆出来 但是里面至少有一个字段应该是代表的type

或者 我们应该使用Attr6buf来判断这个是否为一个Mention消息

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