Skip to content

Commit b05a64f

Browse files
邀请入群添加邀请人id [invitor_id]
1 parent 8343db5 commit b05a64f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

coolq/event.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -543,21 +543,23 @@ func (bot *CQBot) groupInvitedEvent(c *client.QQClient, e *client.GroupInvitedRe
543543
log.Infof("收到来自群 %v(%v) 内用户 %v(%v) 的加群邀请.", e.GroupName, e.GroupCode, e.InvitorNick, e.InvitorUin)
544544
flag := strconv.FormatInt(e.RequestId, 10)
545545
bot.dispatchEvent("request/group/invite", global.MSG{
546-
"group_id": e.GroupCode,
547-
"user_id": e.InvitorUin,
548-
"comment": "",
549-
"flag": flag,
546+
"group_id": e.GroupCode,
547+
"user_id": e.InvitorUin,
548+
"invitor_id": 0,
549+
"comment": "",
550+
"flag": flag,
550551
})
551552
}
552553

553554
func (bot *CQBot) groupJoinReqEvent(c *client.QQClient, e *client.UserJoinGroupRequest) {
554555
log.Infof("群 %v(%v) 收到来自用户 %v(%v) 的加群请求.", e.GroupName, e.GroupCode, e.RequesterNick, e.RequesterUin)
555556
flag := strconv.FormatInt(e.RequestId, 10)
556557
bot.dispatchEvent("request/group/add", global.MSG{
557-
"group_id": e.GroupCode,
558-
"user_id": e.RequesterUin,
559-
"comment": e.Message,
560-
"flag": flag,
558+
"group_id": e.GroupCode,
559+
"user_id": e.RequesterUin,
560+
"invitor_id": e.ActionUin,
561+
"comment": e.Message,
562+
"flag": flag,
561563
})
562564
}
563565

0 commit comments

Comments
 (0)