Skip to content

Commit

Permalink
fix: 成员加群增加昵称字段
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn committed Jul 24, 2024
1 parent 7d93348 commit 5f59511
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -52,6 +52,7 @@ type (
GroupEvent
TargetUid string
TargetUin uint32
TargetNick string
InvitorUid string
InvitorUin uint32
Answer string // 问题:(.*)答案:(.*)
Expand Down
2 changes: 2 additions & 0 deletions client/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func decodeOlPushServicePacket(c *QQClient, pkt *network.Packet) (any, error) {
user, _ := c.FetchUserInfo(ev.TargetUid)
if user != nil {
ev.TargetUin = user.Uin
ev.TargetNick = user.Nickname
}
requests, err := c.GetGroupSystemMessages(ev.GroupUin)
if err == nil {
Expand All @@ -147,6 +148,7 @@ func decodeOlPushServicePacket(c *QQClient, pkt *network.Packet) (any, error) {
user, _ := c.FetchUserInfo(ev.TargetUid)
if user != nil {
ev.TargetUin = user.Uin
ev.TargetNick = user.Nickname
}
c.GroupMemberJoinRequestEvent.dispatch(c, ev)
return nil, nil
Expand Down

0 comments on commit 5f59511

Please sign in to comment.