Skip to content

Commit

Permalink
fix: 加群邀请事件增加群名称字段
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn committed Oct 7, 2024
1 parent 533b985 commit 9e991be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/event/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ type (

type GroupInvite struct {
GroupUin uint32
GroupName string
InvitorUid string
InvitorUin uint32
InvitorNick string
Expand Down
4 changes: 4 additions & 0 deletions client/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ func decodeOlPushServicePacket(c *QQClient, pkt *network.Packet) (any, error) {
return nil, err
}
ev := eventConverter.ParseInviteNotice(&pb)
group, err := c.FetchGroupInfo(ev.GroupUin, true)
if err == nil {
ev.GroupName = group.GroupName
}
_ = c.PreprocessOther(ev)
user, _ := c.FetchUserInfo(ev.InvitorUid)
if user != nil {
Expand Down

0 comments on commit 9e991be

Please sign in to comment.