Merge branch 'v2.3.0release' into del

pull/351/head
wangchuxiao 2 years ago
commit 6d19af02c9

@ -12,6 +12,7 @@ import (
"Open_IM/pkg/common/token_verify" "Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3" "Open_IM/pkg/grpc-etcdv3/getcdv3"
pbFriend "Open_IM/pkg/proto/friend" pbFriend "Open_IM/pkg/proto/friend"
pbOrganization "Open_IM/pkg/proto/organization"
sdkws "Open_IM/pkg/proto/sdk_ws" sdkws "Open_IM/pkg/proto/sdk_ws"
pbUser "Open_IM/pkg/proto/user" pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
@ -432,21 +433,34 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
if req.UserInfo.Nickname != "" { if req.UserInfo.Nickname != "" {
go s.SyncJoinedGroupMemberNickname(req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, req.OperationID, req.OpUserID) go s.SyncJoinedGroupMemberNickname(req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, req.OperationID, req.OpUserID)
} }
//updateUserInfoToCacheReq := &cache.UpdateUserInfoToCacheReq{
// OperationID: req.OperationID, clientOrg := pbOrganization.NewOrganizationClient(etcdConn)
// UserInfoList: []*sdkws.UserInfo{req.UserInfo}, out, err := clientOrg.UpdateOrganizationUser(context.Background(), &pbOrganization.UpdateOrganizationUserReq{
//} OrganizationUser: &sdkws.OrganizationUser{
//cacheEtcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName) UserID: req.UserInfo.UserID,
//cacheClient := cache.NewCacheClient(cacheEtcdConn) Nickname: req.UserInfo.Nickname,
//resp, err := cacheClient.UpdateUserInfoToCache(context.Background(), updateUserInfoToCacheReq) EnglishName: req.UserInfo.Nickname,
//if err != nil { FaceURL: req.UserInfo.FaceURL,
// log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), updateUserInfoToCacheReq.String()) Gender: req.UserInfo.Gender,
// return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: err.Error()}}, nil Mobile: req.UserInfo.PhoneNumber,
//} Telephone: req.UserInfo.PhoneNumber,
//if resp.CommonResp.ErrCode != 0 { Birth: req.UserInfo.Birth,
// log.NewError(req.OperationID, utils.GetSelfFuncName(), resp.String()) Email: req.UserInfo.Email,
// return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: resp.CommonResp.ErrMsg}}, nil Ex: req.UserInfo.Ex,
//} },
OperationID: req.OperationID,
OpUserID: req.OpUserID,
})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateOrganizationUser failed")
} else {
if out.ErrCode == 0 {
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
} else {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "grpc resp: ", out)
}
}
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil
} }
func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.SetGlobalRecvMessageOptReq) (*pbUser.SetGlobalRecvMessageOptResp, error) { func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.SetGlobalRecvMessageOptReq) (*pbUser.SetGlobalRecvMessageOptResp, error) {

Loading…
Cancel
Save