Skip to content

Commit

Permalink
[Core] Fixed wrong and expire message of ForwardEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Mar 3, 2024
1 parent b2304b2 commit 0ebd6b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ internal partial class SrcMsg
[ProtoContract]
internal class Preserve
{
[ProtoMember(3)] public long? Field3 { get; set; }
[ProtoMember(3)] public long? MessageId { get; set; }

[ProtoMember(6)] public string? SenderUid { get; set; }

[ProtoMember(7)] public string? ReceiverUid { get; set; }

[ProtoMember(8)] public int? Field8 { get; set; }
[ProtoMember(8)] public uint? MessageSequence { get; set; }
}
}
4 changes: 2 additions & 2 deletions Lagrange.Core/Message/Entity/ForwardEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ IEnumerable<Elem> IMessageEntity.PackElement()
{
var reserve = new SrcMsg.Preserve
{
Field3 = Random.Shared.Next(0, int.MaxValue),
MessageId = Random.Shared.NextInt64(0, int.MaxValue) | 0x1000000000000000L,
ReceiverUid = SelfUid,
SenderUid = Uid,
Field8 = Random.Shared.Next(0, 10000)
MessageSequence = Sequence
};
using var stream = new MemoryStream();
Serializer.Serialize(stream, reserve);
Expand Down

0 comments on commit 0ebd6b8

Please sign in to comment.