Skip to content

Commit

Permalink
fix: 补充InternalId
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn committed Jun 29, 2024
1 parent b9870fa commit f854a47
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ func (s *Sender) IsAnonymous() bool {

func ParsePrivateMessage(msg *message.PushMsg) *PrivateMessage {
prvMsg := &PrivateMessage{
Id: int32(msg.Message.ContentHead.Sequence.Unwrap()),
Self: int64(msg.Message.ResponseHead.ToUin),
Target: int64(msg.Message.ResponseHead.FromUin),
Id: int32(msg.Message.ContentHead.Sequence.Unwrap()),
InternalId: int32(msg.Message.ContentHead.MsgId.Unwrap()),
Self: int64(msg.Message.ResponseHead.ToUin),
Target: int64(msg.Message.ResponseHead.FromUin),
Sender: &Sender{
Uin: msg.Message.ResponseHead.FromUin,
Uid: msg.Message.ResponseHead.FromUid.Unwrap(),
Expand All @@ -119,9 +120,10 @@ func ParsePrivateMessage(msg *message.PushMsg) *PrivateMessage {

func ParseGroupMessage(msg *message.PushMsg) *GroupMessage {
grpMsg := &GroupMessage{
Id: int32(msg.Message.ContentHead.Sequence.Unwrap()),
GroupCode: msg.Message.ResponseHead.Grp.GroupUin,
GroupName: msg.Message.ResponseHead.Grp.GroupName,
Id: int32(msg.Message.ContentHead.Sequence.Unwrap()),
InternalId: int32(msg.Message.ContentHead.MsgId.Unwrap()),
GroupCode: msg.Message.ResponseHead.Grp.GroupUin,
GroupName: msg.Message.ResponseHead.Grp.GroupName,
Sender: &Sender{
Uin: msg.Message.ResponseHead.FromUin,
Uid: msg.Message.ResponseHead.FromUid.Unwrap(),
Expand Down

0 comments on commit f854a47

Please sign in to comment.