Skip to content

Commit

Permalink
[Core] Fixed ForwardEntity.cs incorrect behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Feb 29, 2024
1 parent 76b56de commit 4be48bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lagrange.Core/Message/Entity/ForwardEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ForwardEntity : IMessageEntity

internal List<Elem> Elements { get; }

private string? SelfUin { get; set; }
private string? SelfUid { get; set; }

public ForwardEntity()
{
Expand All @@ -36,8 +36,8 @@ IEnumerable<Elem> IMessageEntity.PackElement()
var reserve = new SrcMsg.Preserve
{
Field3 = Random.Shared.Next(0, int.MaxValue),
ReceiverUid = Uid,
SenderUid = SelfUin,
ReceiverUid = SelfUid,
SenderUid = Uid,
Field8 = Random.Shared.Next(0, 10000)
};
using var stream = new MemoryStream();
Expand Down Expand Up @@ -74,7 +74,7 @@ IEnumerable<Elem> IMessageEntity.PackElement()
return null;
}

public void SetSelfUid(string selfUid) => SelfUin = selfUid;
public void SetSelfUid(string selfUid) => SelfUid = selfUid;

public string ToPreviewString() => $"[Forward]: Sequence: {Sequence}";
}

0 comments on commit 4be48bb

Please sign in to comment.