diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index abe81e9ed..a2d2ace44 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -54,12 +54,19 @@ func setGroupInfo(groupID string, groupInfo *open_im_sdk.GroupInfo) error { func setGroupMemberInfo(groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) error { groupMember, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) - if err != nil { - return utils.Wrap(err, "") + if err == nil { + return utils.Wrap(utils2.GroupMemberDBCopyOpenIM(groupMemberInfo, groupMember), "") } - if err = utils2.GroupMemberDBCopyOpenIM(groupMemberInfo, groupMember); err != nil { + + user, err := imdb.GetUserByUserID(userID) + if err != nil { return utils.Wrap(err, "") } + groupMemberInfo.GroupID = groupID + groupMemberInfo.UserID = user.UserID + groupMemberInfo.Nickname = user.Nickname + groupMemberInfo.AppMangerLevel = user.AppMangerLevel + groupMemberInfo.FaceURL = user.FaceURL return nil } diff --git a/pkg/grpc-etcdv3/getcdv3/register.go b/pkg/grpc-etcdv3/getcdv3/register.go index e1a78dd61..3e12486a5 100644 --- a/pkg/grpc-etcdv3/getcdv3/register.go +++ b/pkg/grpc-etcdv3/getcdv3/register.go @@ -64,9 +64,9 @@ func RegisterEtcd(schema, etcdAddr, myHost string, myPort int, serviceName strin //keepalive kresp, err := cli.KeepAlive(ctx, resp.ID) if err != nil { - return fmt.Errorf("keepalive faild, errmsg:%v, lease id:%d", err, resp.ID) + return fmt.Errorf("keepalive failed, errmsg:%v, lease id:%d", err, resp.ID) } - + fmt.Println("RegisterEtcd ok") go func() { FLOOP: for {