Skip to content

Commit

Permalink
[Core] Added MessageId for MessageChain.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan authored and Linwenxuan committed Oct 26, 2023
1 parent 1eac08f commit da5f7f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lagrange.Core/Message/MessageChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public sealed class MessageChain : List<IMessageEntity>

public uint FriendUin { get; }

public ulong MessageId { get; }

public BotFriend? FriendInfo { get; internal set; }

public BotGroupMember? GroupMemberInfo { get; internal set; }
Expand All @@ -28,13 +30,14 @@ public sealed class MessageChain : List<IMessageEntity>

#endregion

internal MessageChain(uint friendUin, string selfUid, string friendUid)
internal MessageChain(uint friendUin, string selfUid, string friendUid, ulong messageId = 0)
{
GroupUin = null;
FriendUin = friendUin;
Sequence = 0; // unuseful at there
SelfUid = selfUid;
Uid = friendUid;
MessageId = messageId;
IsGroup = false;
Elements = new List<Elem>();
}
Expand All @@ -48,12 +51,13 @@ internal MessageChain(uint groupUin)
Elements = new List<Elem>();
}

internal MessageChain(uint groupUin, uint friendUin, uint sequence)
internal MessageChain(uint groupUin, uint friendUin, uint sequence, ulong messageId = 0)
{
GroupUin = groupUin;
FriendUin = friendUin;
Sequence = sequence;
Uid = null;
MessageId = messageId;
IsGroup = true;
Elements = new List<Elem>();
}
Expand Down

0 comments on commit da5f7f8

Please sign in to comment.