mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-27 03:58:55 +08:00
group notification
This commit is contained in:
parent
b6b77376d5
commit
720c351da8
@ -374,29 +374,28 @@ func (g *GroupNotificationSender) MemberQuitNotification(ctx context.Context, re
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// todo 退群后查不到
|
|
||||||
opUserID := mcontext.GetOpUserID(ctx)
|
opUserID := mcontext.GetOpUserID(ctx)
|
||||||
user, err := g.getUser(ctx, opUserID)
|
user, err := g.getUser(ctx, opUserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
userIDs, err := g.getGroupOwnerAndAdminUserID(ctx, req.GroupID)
|
//userIDs, err := g.getGroupOwnerAndAdminUserID(ctx, req.GroupID)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
//}
|
||||||
tips := &sdkws.MemberQuitTips{Group: group, QuitUser: &sdkws.GroupMemberFullInfo{
|
tips := &sdkws.MemberQuitTips{Group: group, QuitUser: &sdkws.GroupMemberFullInfo{
|
||||||
GroupID: group.GroupID,
|
GroupID: group.GroupID,
|
||||||
UserID: user.UserID,
|
UserID: user.UserID,
|
||||||
Nickname: user.Nickname,
|
Nickname: user.Nickname,
|
||||||
FaceURL: user.FaceURL,
|
FaceURL: user.FaceURL,
|
||||||
}}
|
}}
|
||||||
for _, userID := range append(userIDs, opUserID) {
|
//for _, userID := range append(userIDs, opUserID) {
|
||||||
err = g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), userID, constant.MemberQuitNotification, tips)
|
// err = g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), userID, constant.MemberQuitNotification, tips)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return err
|
// log.ZError(ctx, "MemberQuitNotification failed", err, "group", req.GroupID, "userID", userID)
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
return nil
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), req.GroupID, constant.MemberQuitNotification, tips)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *GroupNotificationSender) GroupApplicationAcceptedNotification(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (err error) {
|
func (g *GroupNotificationSender) GroupApplicationAcceptedNotification(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (err error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user