|
|
|
@ -3,7 +3,7 @@ package group
|
|
|
|
|
import (
|
|
|
|
|
"Open_IM/internal/rpc/chat"
|
|
|
|
|
"Open_IM/pkg/common/db"
|
|
|
|
|
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
|
|
|
|
immsql "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
|
"Open_IM/pkg/proto/group"
|
|
|
|
|
"context"
|
|
|
|
@ -11,7 +11,7 @@ import (
|
|
|
|
|
|
|
|
|
|
func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.GroupApplicationResponseReq) (*group.GroupApplicationResponseResp, error) {
|
|
|
|
|
log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String())
|
|
|
|
|
reply, err := im_mysql_model.GroupApplicationResponse(pb)
|
|
|
|
|
reply, err := immsql.GroupApplicationResponse(pb)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb)
|
|
|
|
|
return &group.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil
|
|
|
|
@ -33,7 +33,17 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.Grou
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if pb.ToUserID == "0" {
|
|
|
|
|
chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID)
|
|
|
|
|
group, err := immsql.FindGroupInfoByGroupId(pb.GroupID)
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
member, err := immsql.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID)
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID, *group, *member, pb.HandleResult, pb.HandledMsg)
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if pb.HandleResult == 1 {
|
|
|
|
|