Skip to content

Commit

Permalink
[Core] Fixed Bug that elems and ForwardEntity.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan authored and Linwenxuan committed Feb 5, 2024
1 parent 1c2d4f5 commit 071825f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lagrange.Core/Message/Entity/ForwardEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ForwardEntity : IMessageEntity

public uint TargetUin { get; internal set; }

private List<Elem> Elements { get; }
internal List<Elem> Elements { get; }

private string? SelfUin { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions Lagrange.Core/Message/MessagePacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ private static MessageChain ParseChain(PushMsgBody message)
message.ContentHead.Sequence ?? 0,
message.ContentHead.NewId ?? 0);

if (message.Body?.RichText?.Elems is { } elems) chain.Elements.AddRange(elems);

chain.Time = DateTimeOffset.FromUnixTimeSeconds(message.ContentHead.Timestamp ?? 0).DateTime;

return chain;
Expand Down

0 comments on commit 071825f

Please sign in to comment.