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

Commit 8681bf0

Browse files
authored
[Core] Fixed the problem that AtEntity after ForwardEntity was not filtered (#816)
1 parent ae38af3 commit 8681bf0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lagrange.Core/Message/Entity/MentionEntity.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ IEnumerable<Elem> IMessageEntity.PackElement()
6464
MentionExtra info = Serializer.Deserialize<MentionExtra>(extra.AsSpan());
6565
if (info.Type != 2) return null;
6666

67+
// shit!
68+
if (info.Uin == 0 && elems.Text.Attr6Buf is { Length: > 11 } attr)
69+
{
70+
info.Uin = BitConverter.ToUInt32(attr.AsSpan()[7..11], false);
71+
}
72+
73+
6774
return new MentionEntity
6875
{
6976
Name = elems.Text.Str,

0 commit comments

Comments
 (0)