|
|
@ -453,30 +453,30 @@ func (g *GroupNotificationSender) GroupOwnerTransferredNotification(ctx context.
|
|
|
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.GroupOwnerTransferredNotification, tips)
|
|
|
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.GroupOwnerTransferredNotification, tips)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (g *GroupNotificationSender) MemberKickedNotification(ctx context.Context, req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) (err error) {
|
|
|
|
func (g *GroupNotificationSender) MemberKickedNotification(ctx context.Context, tips *sdkws.MemberKickedTips) (err error) {
|
|
|
|
defer log.ZDebug(ctx, "return")
|
|
|
|
//defer log.ZDebug(ctx, "return")
|
|
|
|
defer func() {
|
|
|
|
//defer func() {
|
|
|
|
if err != nil {
|
|
|
|
// if err != nil {
|
|
|
|
log.ZError(ctx, utils.GetFuncName(1)+" failed", err)
|
|
|
|
// log.ZError(ctx, utils.GetFuncName(1)+" failed", err)
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}()
|
|
|
|
//}()
|
|
|
|
group, err := g.getGroupInfo(ctx, req.GroupID)
|
|
|
|
//group, err := g.getGroupInfo(ctx, tips.GroupID)
|
|
|
|
if err != nil {
|
|
|
|
//if err != nil {
|
|
|
|
return err
|
|
|
|
// return err
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
user, err := g.getGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx))
|
|
|
|
//user, err := g.getGroupMember(ctx, tips.GroupID, mcontext.GetOpUserID(ctx))
|
|
|
|
if err != nil {
|
|
|
|
//if err != nil {
|
|
|
|
return err
|
|
|
|
// return err
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
tips := &sdkws.MemberKickedTips{Group: group, OpUser: user}
|
|
|
|
//tips := &sdkws.MemberKickedTips{Group: group, OpUser: user}
|
|
|
|
//for _, v := range kickedUserIDList {
|
|
|
|
//for _, v := range kickedUserIDList {
|
|
|
|
// var groupMemberInfo sdkws.GroupMemberFullInfo
|
|
|
|
// var groupMemberInfo sdkws.GroupMemberFullInfo
|
|
|
|
// if err := c.setGroupMemberInfo(ctx, req.GroupID, v, &groupMemberInfo); err != nil {
|
|
|
|
// if err := c.setGroupMemberInfo(ctx, tips.GroupID, v, &groupMemberInfo); err != nil {
|
|
|
|
// continue
|
|
|
|
// continue
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo)
|
|
|
|
// MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo)
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.MemberKickedNotification, tips)
|
|
|
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), tips.Group.GroupID, constant.MemberKickedNotification, tips)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (g *GroupNotificationSender) MemberInvitedNotification(ctx context.Context, groupID, reason string, invitedUserIDList []string) (err error) {
|
|
|
|
func (g *GroupNotificationSender) MemberInvitedNotification(ctx context.Context, groupID, reason string, invitedUserIDList []string) (err error) {
|
|
|
|