Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao 2023-01-16 20:14:49 +08:00
commit 4854db030f
21 changed files with 2072 additions and 2193 deletions

View File

@ -3,14 +3,12 @@ package main
import ( import (
_ "Open_IM/cmd/open_im_api/docs" _ "Open_IM/cmd/open_im_api/docs"
apiAuth "Open_IM/internal/api/auth" apiAuth "Open_IM/internal/api/auth"
clientInit "Open_IM/internal/api/client_init"
"Open_IM/internal/api/conversation" "Open_IM/internal/api/conversation"
"Open_IM/internal/api/friend" "Open_IM/internal/api/friend"
"Open_IM/internal/api/group" "Open_IM/internal/api/group"
"Open_IM/internal/api/manage" "Open_IM/internal/api/manage"
apiChat "Open_IM/internal/api/msg" apiChat "Open_IM/internal/api/msg"
"Open_IM/internal/api/office" "Open_IM/internal/api/office"
"Open_IM/internal/api/organization"
apiThird "Open_IM/internal/api/third" apiThird "Open_IM/internal/api/third"
"Open_IM/internal/api/user" "Open_IM/internal/api/user"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
@ -81,17 +79,17 @@ func main() {
friendRouterGroup := r.Group("/friend") friendRouterGroup := r.Group("/friend")
{ {
// friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo)
friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 friendRouterGroup.POST("/add_friend", friend.AddFriend) //1
friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1
friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1
friendRouterGroup.POST("/get_self_friend_apply_list", friend.GetSelfFriendApplyList) //1 friendRouterGroup.POST("/get_self_friend_apply_list", friend.GetSelfApplyList) //1
friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1
friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1
friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1
friendRouterGroup.POST("/add_black", friend.AddBlack) //1 friendRouterGroup.POST("/add_black", friend.AddBlack) //1
friendRouterGroup.POST("/get_black_list", friend.GetBlacklist) //1 friendRouterGroup.POST("/get_black_list", friend.GetBlacklist) //1
friendRouterGroup.POST("/remove_black", friend.RemoveBlack) //1 friendRouterGroup.POST("/remove_black", friend.RemoveBlacklist) //1
friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1
friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 friendRouterGroup.POST("/is_friend", friend.IsFriend) //1

File diff suppressed because it is too large Load Diff

View File

@ -5,27 +5,53 @@ import (
api "Open_IM/pkg/base_info" api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
rpc "Open_IM/pkg/proto/friend" rpc "Open_IM/pkg/proto/friend"
"Open_IM/pkg/utils"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
// 不一致 func AddBlack(c *gin.Context) {
func AddBlacklist(c *gin.Context) { common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{},
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
} }
func ImportFriend1(c *gin.Context) { func ImportFriend(c *gin.Context) {
common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{}, common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
} }
func AddFriend1(c *gin.Context) { func AddFriend(c *gin.Context) {
common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{}, common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
} }
func AddFriendResponse1(c *gin.Context) { func AddFriendResponse(c *gin.Context) {
common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{}, common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName()) }
func DeleteFriend(c *gin.Context) {
common.ApiToRpc(c, &api.DeleteFriendReq{}, &api.DeleteFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func GetBlacklist(c *gin.Context) {
common.ApiToRpc(c, &api.GetBlackListReq{}, &api.GetBlackListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func SetFriendRemark(c *gin.Context) {
common.ApiToRpc(c, &api.SetFriendRemarkReq{}, &api.SetFriendRemarkResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func RemoveBlacklist(c *gin.Context) {
common.ApiToRpc(c, &api.RemoveBlacklistReq{}, &api.RemoveBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func IsFriend(c *gin.Context) {
common.ApiToRpc(c, &api.IsFriendReq{}, &api.IsFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func GetFriendList(c *gin.Context) {
common.ApiToRpc(c, &api.GetFriendListReq{}, &api.GetFriendListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func GetFriendApplyList(c *gin.Context) {
common.ApiToRpc(c, &api.GetFriendApplyListReq{}, &api.GetFriendApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
}
func GetSelfApplyList(c *gin.Context) {
common.ApiToRpc(c, &api.GetSelfApplyListReq{}, &api.GetSelfApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
} }

View File

@ -12,48 +12,43 @@ import (
) )
func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string) { func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string) {
if rpcName == "" {
rpcName = utils2.GetFuncName(1)
}
logFuncName := fmt.Sprintf("[ApiToRpc: %s]%s", utils2.GetFuncName(1), rpcFuncName) logFuncName := fmt.Sprintf("[ApiToRpc: %s]%s", utils2.GetFuncName(1), rpcFuncName)
operationID := c.GetHeader("operationID") ctx := trace_log.NewCtx1(c, rpcFuncName)
nCtx := trace_log.NewCtx1(c, rpcFuncName, operationID) defer log.ShowLog(ctx)
defer log.ShowLog(nCtx)
if err := c.BindJSON(apiReq); err != nil { if err := c.BindJSON(apiReq); err != nil {
trace_log.WriteErrorResponse(nCtx, "BindJSON", err) trace_log.WriteErrorResponse(ctx, "BindJSON", err)
return return
} }
trace_log.SetCtxInfo(nCtx, logFuncName, nil, "apiReq", apiReq) trace_log.SetCtxInfo(ctx, logFuncName, nil, "apiReq", apiReq)
etcdConn, err := getcdv3.GetConn(nCtx, rpcName) etcdConn, err := getcdv3.GetConn(ctx, rpcName)
if err != nil { if err != nil {
trace_log.WriteErrorResponse(nCtx, "GetConn", err) trace_log.WriteErrorResponse(ctx, "GetConn", err)
return return
} }
rpc := reflect.ValueOf(rpcClientFunc).Call([]reflect.Value{ rpcClient := reflect.ValueOf(rpcClientFunc).Call([]reflect.Value{
reflect.ValueOf(etcdConn), reflect.ValueOf(etcdConn),
})[0].MethodByName(rpcFuncName) // rpc func })[0].MethodByName(rpcFuncName) // rpcClient func
rpcReqPtr := reflect.New(rpc.Type().In(1).Elem()) // *req参数 rpcReqPtr := reflect.New(rpcClient.Type().In(1).Elem()) // *req
//if err := utils.CopyStructFields(rpcReqPtr.Interface(), apiReq); err != nil {
// trace_log.WriteErrorResponse(nCtx, "CopyStructFields_RpcReq", err)
// return
//}
CopyAny(apiReq, rpcReqPtr.Interface()) CopyAny(apiReq, rpcReqPtr.Interface())
trace_log.SetCtxInfo(nCtx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface())) trace_log.SetCtxInfo(ctx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface()))
respArr := rpc.Call([]reflect.Value{ respArr := rpcClient.Call([]reflect.Value{
reflect.ValueOf(context.Context(c)), // context.Context reflect.ValueOf(context.Context(c)), // context.Context (ctx operationID. opUserID)
rpcReqPtr, // rpc apiReq rpcReqPtr, // rpcClient apiReq
}) // respArr => (apiResp, error) }) // respArr => (apiResp, error)
if !respArr[1].IsNil() { // rpc err != nil if !respArr[1].IsNil() { // rpcClient err != nil
err := respArr[1].Interface().(error) err := respArr[1].Interface().(error)
trace_log.WriteErrorResponse(nCtx, rpcFuncName, err, "callRpcResp", "error") trace_log.WriteErrorResponse(ctx, rpcFuncName, err, "callRpcResp", "error")
return return
} }
rpcResp := respArr[0].Elem() rpcResp := respArr[0].Elem()
trace_log.SetCtxInfo(nCtx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface())) trace_log.SetCtxInfo(ctx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface()))
if apiResp != nil { if apiResp != nil {
//if err := utils.CopyStructFields(apiResp, rpcResp.Interface()); err != nil {
// trace_log.SetCtxInfo(nCtx, "CopyStructFields_RpcResp", err, "apiResp", fmt.Sprintf("%T", apiResp), "rpcResp", fmt.Sprintf("%T", rpcResp.Interface()))
//}
CopyAny(rpcResp.Interface(), apiResp) CopyAny(rpcResp.Interface(), apiResp)
} }
trace_log.SetSuccess(nCtx, rpcFuncName, apiResp) trace_log.SetSuccess(ctx, rpcFuncName, apiResp)
} }
func rpcString(v interface{}) string { func rpcString(v interface{}) string {
@ -62,77 +57,3 @@ func rpcString(v interface{}) string {
} }
return fmt.Sprintf("%+v", v) return fmt.Sprintf("%+v", v)
} }
//func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, fn interface{}, rpcFuncName string, tokenFunc func(token string, operationID string) (string, error)) {
// nCtx := trace_log.NewCtx(c, rpcFuncName)
// defer trace_log.ShowLog(nCtx)
// if err := c.BindJSON(apiReq); err != nil {
// trace_log.WriteErrorResponse(nCtx, "BindJSON", err)
// return
// }
// reqValue := reflect.ValueOf(apiReq).Elem()
// operationID := reqValue.FieldByName("OperationID").String()
// trace_log.SetOperationID(nCtx, operationID)
// trace_log.SetCtxInfo(nCtx, "BindJSON", nil, "params", apiReq)
// etcdConn, err := utils2.GetConn(c, rpcName)
// if err != nil {
// trace_log.WriteErrorResponse(nCtx, "GetDefaultConn", err)
// return
// }
// rpc := reflect.ValueOf(fn).Call([]reflect.Value{
// reflect.ValueOf(etcdConn),
// })[0].MethodByName(rpcFuncName) // rpc func
// rpcReqPtr := reflect.New(rpc.Type().In(1).Elem()) // *req参数
// var opUserID string
// if tokenFunc != nil {
// var err error
// opUserID, err = tokenFunc(c.GetHeader("token"), operationID)
// if err != nil {
// trace_log.WriteErrorResponse(nCtx, "TokenFunc", err)
// return
// }
// }
// if opID := rpcReqPtr.Elem().FieldByName("OperationID"); opID.IsValid() {
// opID.SetString(operationID)
// if opU := rpcReqPtr.Elem().FieldByName("OpUserID"); opU.IsValid() {
// opU.SetString(opUserID)
// }
// } else {
// op := rpcReqPtr.Elem().FieldByName("Operation").Elem()
// op.FieldByName("OperationID").SetString(operationID)
// op.FieldByName("OpUserID").SetString(opUserID)
// }
// if err := utils.CopyStructFields(rpcReqPtr.Interface(), apiReq); err != nil {
// trace_log.WriteErrorResponse(nCtx, "CopyStructFields_RpcReq", err)
// return
// }
// respArr := rpc.Call([]reflect.Value{
// reflect.ValueOf(context.Context(c)), // context.Context
// rpcReqPtr, // rpc apiReq
// }) // respArr => (apiResp, error)
// if !respArr[1].IsNil() { // rpc err != nil
// err := respArr[1].Interface().(error)
// trace_log.WriteErrorResponse(nCtx, rpcFuncName, err, "rpc req", rpcReqPtr.Interface())
// return
// }
// rpcResp := respArr[0].Elem()
// trace_log.SetCtxInfo(nCtx, rpcFuncName, nil, "rpc req", rpcReqPtr.Interface(), "resp", rpcResp.Interface())
// commonResp := rpcResp.FieldByName("CommonResp").Elem()
// errCodeVal := commonResp.FieldByName("ErrCode")
// errMsgVal := commonResp.FieldByName("ErrMsg").Interface().(string)
// errCode := errCodeVal.Interface().(int32)
// if errCode != 0 {
// trace_log.WriteErrorResponse(nCtx, "RpcErrCode", &constant.ErrInfo{
// ErrCode: errCode,
// ErrMsg: errMsgVal,
// })
// return
// }
// if apiResp != nil {
// if err := utils.CopyStructFields(apiResp, rpcResp.Interface()); err != nil {
// trace_log.WriteErrorResponse(nCtx, "CopyStructFields_RpcResp", err)
// return
// }
// }
// trace_log.SetSuccess(nCtx, rpcFuncName, apiResp)
//}

View File

@ -6,25 +6,6 @@ import (
"reflect" "reflect"
) )
func setBaseValue(from, to reflect.Value) {
if isBaseNil(from) {
return
}
var l int
t := to.Type()
for t.Kind() == reflect.Ptr {
l++
t = t.Elem()
}
v := baseValue(from)
for i := 0; i < l; i++ {
t := reflect.New(v.Type())
t.Elem().Set(v)
v = t
}
to.Set(v)
}
func CopyAny(from, to interface{}) { func CopyAny(from, to interface{}) {
t := reflect.ValueOf(to) t := reflect.ValueOf(to)
if t.Kind() == reflect.Ptr { if t.Kind() == reflect.Ptr {
@ -50,31 +31,35 @@ func copyAny(from, to reflect.Value) {
if isBaseNil(to) { if isBaseNil(to) {
to.Set(getBaseZeroValue(to.Type())) to.Set(getBaseZeroValue(to.Type()))
} }
btfrom := baseType(from.Type()) btFrom := baseType(from.Type())
btto := baseType(to.Type()) btTo := baseType(to.Type())
if typeEq(btfrom, btto) { if btTo.Kind() == reflect.Interface || typeEq(btFrom, btTo) {
setBaseValue(from, to) setBaseValue(from, to)
return return
} }
if _, ok := wrapType[btto.String()]; ok { // string -> wrapperspb.StringValue if _, ok := wrapType[btTo.String()]; ok { // string -> wrapperspb.StringValue
val := reflect.New(btto).Elem() val := reflect.New(btTo).Elem()
copyAny(from, val.FieldByName("Value")) copyAny(from, val.FieldByName("Value"))
setBaseValue(val, to) setBaseValue(val, to)
return return
} }
if _, ok := wrapType[btfrom.String()]; ok { // wrapperspb.StringValue -> string if _, ok := wrapType[btFrom.String()]; ok { // wrapperspb.StringValue -> string
copyAny(baseValue(from).FieldByName("Value"), to) copyAny(baseValue(from).FieldByName("Value"), to)
return return
} }
if btfrom.Kind() == reflect.Struct && btto.Kind() == reflect.Struct { if btFrom.Kind() == reflect.Struct && btTo.Kind() == reflect.Struct {
copyStruct(baseValue(from), baseValue(to)) copyStruct(baseValue(from), baseValue(to))
return return
} }
if btfrom.Kind() == reflect.Slice && btto.Kind() == reflect.Slice { if btFrom.Kind() == reflect.Slice && btTo.Kind() == reflect.Slice {
copySlice(baseValue(from), baseValue(to)) copySlice(baseValue(from), baseValue(to))
return return
} }
if btto.Kind() == reflect.String { if btFrom.Kind() == reflect.Map && btTo.Kind() == reflect.Map {
copyMap(baseValue(from), baseValue(to))
return
}
if btTo.Kind() == reflect.String {
if isBaseNil(to) { if isBaseNil(to) {
to.Set(getBaseZeroValue(baseType(to.Type()))) to.Set(getBaseZeroValue(baseType(to.Type())))
} }
@ -84,6 +69,26 @@ func copyAny(from, to reflect.Value) {
if toNumber(from, to) { if toNumber(from, to) {
return return
} }
}
func setBaseValue(from, to reflect.Value) {
if isBaseNil(from) {
return
}
var l int
t := to.Type()
for t.Kind() == reflect.Ptr {
l++
t = t.Elem()
}
v := baseValue(from)
for i := 0; i < l; i++ {
t := reflect.New(v.Type())
t.Elem().Set(v)
v = t
}
to.Set(v)
} }
func getBaseZeroValue(t reflect.Type) reflect.Value { func getBaseZeroValue(t reflect.Type) reflect.Value {
@ -121,15 +126,6 @@ func baseType(t reflect.Type) reflect.Type {
return t return t
} }
func baseLayer(t reflect.Type) int {
var layer int
for t.Kind() == reflect.Ptr {
layer++
t = t.Elem()
}
return layer
}
func typeEq(t1, t2 reflect.Type) bool { func typeEq(t1, t2 reflect.Type) bool {
return t1.String() == t2.String() return t1.String() == t2.String()
} }
@ -174,59 +170,72 @@ func copySlice(from, to reflect.Value) {
to.Set(temp) to.Set(temp)
} }
func copyMap(from, to reflect.Value) {
// todo copy map
}
func toString(value reflect.Value) string { func toString(value reflect.Value) string {
if value.Kind() == reflect.Slice { if value.Kind() == reflect.Slice {
switch value.Type().String() { switch value.Type().String() {
case "[]uint8": case "[]uint8": // []byte -> []uint8
return string(value.Interface().([]uint8)) return string(value.Interface().([]uint8))
case "[]int32": case "[]int32": // []rune -> []int32
return string(value.Interface().([]int32)) return string(value.Interface().([]int32))
} }
} }
return fmt.Sprint(value.Interface()) return fmt.Sprint(value.Interface())
} }
func toNumber(from1, to1 reflect.Value) bool { func toNumber(from, to reflect.Value) bool {
if isBaseNil(to1) { initTo := func() {
to1.Set(getBaseZeroValue(to1.Type())) if isBaseNil(to) {
to.Set(getBaseZeroValue(to.Type()))
}
} }
from := baseValue(from1) switch baseValue(from).Kind() {
to := baseValue(to1)
switch from.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
switch to.Kind() { switch baseValue(to).Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
to.SetInt(from.Int()) initTo()
baseValue(to).SetInt(baseValue(from).Int())
return true return true
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
to.SetUint(uint64(from.Int())) initTo()
baseValue(to).SetUint(uint64(baseValue(from).Int()))
return true return true
case reflect.Float64, reflect.Float32: case reflect.Float64, reflect.Float32:
to.SetFloat(float64(from.Int())) initTo()
baseValue(to).SetFloat(float64(baseValue(from).Int()))
return true return true
} }
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
switch to.Kind() { switch baseValue(to).Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
to.SetInt(int64(from.Uint())) initTo()
baseValue(to).SetInt(int64(baseValue(from).Uint()))
return true return true
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
to.SetInt(int64(from.Uint())) initTo()
baseValue(to).SetInt(int64(baseValue(from).Uint()))
return true return true
case reflect.Float64, reflect.Float32: case reflect.Float64, reflect.Float32:
to.SetFloat(float64(from.Uint())) initTo()
baseValue(to).SetFloat(float64(baseValue(from).Uint()))
return true return true
} }
case reflect.Float64, reflect.Float32: case reflect.Float64, reflect.Float32:
switch to.Kind() { switch baseValue(to).Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
to.SetInt(int64(from.Float())) initTo()
baseValue(to).SetInt(int64(baseValue(from).Float()))
return true return true
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
to.SetUint(uint64(from.Float())) initTo()
baseValue(to).SetUint(uint64(baseValue(from).Float()))
return true return true
case reflect.Float64, reflect.Float32: case reflect.Float64, reflect.Float32:
to.SetFloat(from.Float()) initTo()
baseValue(to).SetFloat(baseValue(from).Float())
return true return true
} }
} }

View File

@ -4,6 +4,7 @@ import (
chat "Open_IM/internal/rpc/msg" chat "Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
rocksCache "Open_IM/pkg/common/db/rocks_cache" rocksCache "Open_IM/pkg/common/db/rocks_cache"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
@ -11,6 +12,7 @@ import (
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prometheus"
"Open_IM/pkg/common/token_verify" "Open_IM/pkg/common/token_verify"
"Open_IM/pkg/common/tools" "Open_IM/pkg/common/tools"
"Open_IM/pkg/common/trace_log"
cp "Open_IM/pkg/common/utils" cp "Open_IM/pkg/common/utils"
"Open_IM/pkg/getcdv3" "Open_IM/pkg/getcdv3"
pbCache "Open_IM/pkg/proto/cache" pbCache "Open_IM/pkg/proto/cache"
@ -18,6 +20,8 @@ import (
sdkws "Open_IM/pkg/proto/sdk_ws" sdkws "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"errors"
"gorm.io/gorm"
"net" "net"
"strconv" "strconv"
"strings" "strings"
@ -40,14 +44,15 @@ type friendServer struct {
func NewFriendServer(port int) *friendServer { func NewFriendServer(port int) *friendServer {
log.NewPrivateLog(constant.LogFileName) log.NewPrivateLog(constant.LogFileName)
DB := db.DB.MysqlDB.DefaultGormDB()
return &friendServer{ return &friendServer{
rpcPort: port, rpcPort: port,
rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName,
etcdSchema: config.Config.Etcd.EtcdSchema, etcdSchema: config.Config.Etcd.EtcdSchema,
etcdAddr: config.Config.Etcd.EtcdAddr, etcdAddr: config.Config.Etcd.EtcdAddr,
friendModel: imdb.NewFriend(nil), friendModel: imdb.NewFriend(DB),
friendRequestModel: imdb.NewFriendRequest(nil), friendRequestModel: imdb.NewFriendRequest(DB),
blackModel: imdb.NewBlack(nil), blackModel: imdb.NewBlack(DB),
} }
} }
@ -108,10 +113,10 @@ func (s *friendServer) Run() {
func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) { func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) {
resp := &pbFriend.AddBlacklistResp{} resp := &pbFriend.AddBlacklistResp{}
if err := token_verify.CheckAccessV3(ctx, req.CommID.FromUserID); err != nil { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
return nil, err return nil, err
} }
black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} black := imdb.Black{OwnerUserID: req.FromUserID, BlockUserID: req.ToUserID, OperatorUserID: tools.OpUserID(ctx)}
if err := s.blackModel.Create(ctx, []*imdb.Black{&black}); err != nil { if err := s.blackModel.Create(ctx, []*imdb.Black{&black}); err != nil {
return nil, err return nil, err
} }
@ -119,7 +124,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl
if err != nil { if err != nil {
return nil, err return nil, err
} }
_, err = pbCache.NewCacheClient(etcdConn).DelBlackIDListFromCache(ctx, &pbCache.DelBlackIDListFromCacheReq{UserID: req.CommID.FromUserID, OperationID: req.CommID.OperationID}) _, err = pbCache.NewCacheClient(etcdConn).DelBlackIDListFromCache(ctx, &pbCache.DelBlackIDListFromCacheReq{UserID: req.FromUserID})
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -129,25 +134,25 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl
func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.AddFriendResp, error) { func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.AddFriendResp, error) {
resp := &pbFriend.AddFriendResp{} resp := &pbFriend.AddFriendResp{}
if err := token_verify.CheckAccessV3(ctx, req.CommID.FromUserID); err != nil { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
return nil, err return nil, err
} }
if err := callbackBeforeAddFriendV1(req); err != nil { if err := callbackBeforeAddFriendV1(req); err != nil {
return nil, err return nil, err
} }
userIDList, err := rocksCache.GetFriendIDListFromCache(ctx, req.CommID.ToUserID) userIDList, err := rocksCache.GetFriendIDListFromCache(ctx, req.ToUserID)
if err != nil { if err != nil {
return nil, err return nil, err
} }
userIDList2, err := rocksCache.GetFriendIDListFromCache(ctx, req.CommID.FromUserID) userIDList2, err := rocksCache.GetFriendIDListFromCache(ctx, req.FromUserID)
if err != nil { if err != nil {
return nil, err return nil, err
} }
var isSend = true var isSend = true
for _, v := range userIDList { for _, v := range userIDList {
if v == req.CommID.FromUserID { if v == req.FromUserID {
for _, v2 := range userIDList2 { for _, v2 := range userIDList2 {
if v2 == req.CommID.ToUserID { if v2 == req.ToUserID {
isSend = false isSend = false
break break
} }
@ -159,12 +164,12 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
//Cannot add non-existent users //Cannot add non-existent users
if isSend { if isSend {
if _, err := GetUserInfo(ctx, req.CommID.ToUserID); err != nil { if _, err := GetUserInfo(ctx, req.ToUserID); err != nil {
return nil, err return nil, err
} }
friendRequest := imdb.FriendRequest{ friendRequest := imdb.FriendRequest{
FromUserID: req.CommID.FromUserID, FromUserID: req.FromUserID,
ToUserID: req.CommID.ToUserID, ToUserID: req.ToUserID,
HandleResult: 0, HandleResult: 0,
ReqMsg: req.ReqMsg, ReqMsg: req.ReqMsg,
CreateTime: time.Now(), CreateTime: time.Now(),
@ -179,199 +184,113 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) {
resp := &pbFriend.ImportFriendResp{} resp := &pbFriend.ImportFriendResp{}
//var c sdkws.CommonResp
if !utils.IsContain(tools.OpUserID(ctx), config.Config.Manager.AppManagerUid) { if !utils.IsContain(tools.OpUserID(ctx), config.Config.Manager.AppManagerUid) {
//log.NewError(req.OperationID, "not authorized", req.OpUserID, config.Config.Manager.AppManagerUid)
//c.ErrCode = constant.ErrNoPermission.ErrCode
//c.ErrMsg = constant.ErrNoPermission.ErrMsg
//for _, userID := range req.FriendUserIDList {
// resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1})
//}
return nil, constant.ErrNoPermission.Wrap() return nil, constant.ErrNoPermission.Wrap()
} }
if _, err := GetUserInfo(ctx, req.FromUserID); err != nil { if _, err := GetUserInfo(ctx, req.FromUserID); err != nil {
//log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID)
//c.ErrCode = constant.ErrDB.ErrCode
//c.ErrMsg = "this user not exists,cant not add friend"
//for _, userID := range req.FriendUserIDList {
// resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1})
//}
//resp.CommonResp = &c
return nil, err return nil, err
} }
for _, userID := range req.FriendUserIDList { for _, userID := range req.FriendUserIDList {
if _, fErr := GetUserInfo(ctx, userID); fErr != nil { if _, err := GetUserInfo(ctx, userID); err != nil {
resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) return nil, err
} else { }
if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, userID); err != nil { fs, err := s.friendModel.FindUserState(ctx, req.FromUserID, userID)
//Establish two single friendship if err != nil {
toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: userID} return nil, err
err1 := imdb.InsertToFriend(&toInsertFollow) }
if err1 != nil { var friends []*imdb.Friend
log.NewError(req.OperationID, "InsertToFriend failed ", err1.Error(), toInsertFollow) switch len(fs) {
resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) case 1:
continue if fs[0].OwnerUserID == req.FromUserID {
} friends = append(friends, &imdb.Friend{OwnerUserID: userID, FriendUserID: req.FromUserID})
toInsertFollow = imdb.Friend{OwnerUserID: userID, FriendUserID: req.FromUserID}
err2 := imdb.InsertToFriend(&toInsertFollow)
if err2 != nil {
log.NewError(req.OperationID, "InsertToFriend failed ", err2.Error(), toInsertFollow)
resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1})
continue
}
resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: 0})
log.NewDebug(req.OperationID, "UserIDResultList ", resp.UserIDResultList)
chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, userID)
} else { } else {
log.NewWarn(req.OperationID, "GetFriendRelationshipFromFriend ok", req.FromUserID, userID) friends = append(friends, &imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: userID})
resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: 0})
} }
case 0:
friends = append(friends, &imdb.Friend{OwnerUserID: userID, FriendUserID: req.FromUserID}, &imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: userID})
default:
continue
}
if err := s.friendModel.Create(ctx, friends); err != nil {
return nil, err
} }
} }
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID, config.Config.Etcd.UserName, config.Config.Etcd.Password) if err != nil {
if etcdConn == nil { return nil, err
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
resp.CommonResp.ErrMsg = errMsg
resp.CommonResp.ErrCode = 500
return &resp, nil
} }
cacheClient := pbCache.NewCacheClient(etcdConn) cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{UserID: req.FromUserID, OperationID: req.OperationID}) if _, err := cacheClient.DelFriendIDListFromCache(ctx, &pbCache.DelFriendIDListFromCacheReq{UserID: req.FromUserID}); err != nil {
if err != nil { return nil, err
log.NewError(req.OperationID, "DelBlackIDListFromCache rpc call failed ", err.Error())
resp.CommonResp.ErrCode = 500
resp.CommonResp.ErrMsg = err.Error()
return &resp, nil
}
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(req.OperationID, "DelBlackIDListFromCache rpc logic call failed ", cacheResp.String())
resp.CommonResp.ErrCode = 500
resp.CommonResp.ErrMsg = cacheResp.CommonResp.ErrMsg
return &resp, nil
} }
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.FromUserID); err != nil { if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.FromUserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.FromUserID) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "userID", req.FromUserID)
} }
for _, userID := range req.FriendUserIDList { for _, userID := range req.FriendUserIDList {
cacheResp, err := cacheClient.DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{UserID: userID, OperationID: req.OperationID}) if _, err = cacheClient.DelFriendIDListFromCache(ctx, &pbCache.DelFriendIDListFromCacheReq{UserID: userID}); err != nil {
if err != nil { return nil, err
log.NewError(req.OperationID, "DelBlackIDListFromCache rpc call failed ", err.Error())
}
if cacheResp != nil && cacheResp.CommonResp != nil {
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(req.OperationID, "DelBlackIDListFromCache rpc logic call failed ", cacheResp.String())
resp.CommonResp.ErrCode = 500
resp.CommonResp.ErrMsg = cacheResp.CommonResp.ErrMsg
return &resp, nil
}
} }
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, userID); err != nil { if err := rocksCache.DelAllFriendsInfoFromCache(ctx, userID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "userID", userID)
} }
} }
return resp, nil
resp.CommonResp.ErrCode = 0
log.NewInfo(req.OperationID, "ImportFriend rpc ok ", resp.String())
return &resp, nil
} }
// process Friend application // process Friend application
func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.AddFriendResponseResp, error) { func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.AddFriendResponseResp, error) {
log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) resp := &pbFriend.AddFriendResponseResp{}
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
friendRequest, err := s.friendRequestModel.Take(ctx, req.ToUserID, req.FromUserID)
//Check there application before agreeing or refuse to a friend's application
//req.CommID.FromUserID process req.CommID.ToUserID
friendRequest, err := imdb.GetFriendApplicationByBothUserID(req.CommID.ToUserID, req.CommID.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "GetFriendApplicationByBothUserID failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
friendRequest.HandleResult = req.HandleResult friendRequest.HandleResult = req.HandleResult
friendRequest.HandleTime = time.Now() friendRequest.HandleTime = time.Now()
//friendRequest.HandleTime.Unix()
friendRequest.HandleMsg = req.HandleMsg friendRequest.HandleMsg = req.HandleMsg
friendRequest.HandlerUserID = req.CommID.OpUserID friendRequest.HandlerUserID = tools.OpUserID(ctx)
err = imdb.UpdateFriendApplication(friendRequest) err = imdb.UpdateFriendApplication(friendRequest)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) return nil, err
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
//Change the status of the friend request form //Change the status of the friend request form
if req.HandleResult == constant.FriendFlag { if req.HandleResult == constant.FriendFlag {
var isInsert int var isInsert bool
//Establish friendship after find friend relationship not exists //Establish friendship after find friend relationship not exists
_, err := imdb.GetFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) _, err := s.friendModel.Take(ctx, req.FromUserID, req.ToUserID)
if err == nil { if errors.Is(err, gorm.ErrRecordNotFound) {
log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend exist", req.CommID.FromUserID, req.CommID.ToUserID) if err := s.friendModel.Create(ctx, []*imdb.Friend{{OwnerUserID: req.FromUserID, FriendUserID: req.ToUserID, OperatorUserID: tools.OpUserID(ctx)}}); err != nil {
} else { return nil, err
//Establish two single friendship
toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.FromUserID, FriendUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID}
err = imdb.InsertToFriend(&toInsertFollow)
if err != nil {
log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow)
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
isInsert = 1 isInsert = true
} else if err != nil {
return nil, err
} }
_, err = imdb.GetFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID)
if err == nil {
log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID)
} else {
toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID}
err = imdb.InsertToFriend(&toInsertFollow)
if err != nil {
log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow)
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
isInsert = 1
}
// cache rpc // cache rpc
if isInsert == 1 { if isInsert {
delFriendIDListFromCacheReq := &pbCache.DelFriendIDListFromCacheReq{OperationID: req.CommID.OperationID} etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID, config.Config.Etcd.UserName, config.Config.Etcd.Password) if err != nil {
if etcdConn == nil { return nil, err
errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrInternalServer.ErrCode, ErrMsg: errMsg}}, nil
} }
client := pbCache.NewCacheClient(etcdConn) client := pbCache.NewCacheClient(etcdConn)
delFriendIDListFromCacheReq.UserID = req.CommID.ToUserID
respPb, err := client.DelFriendIDListFromCache(context.Background(), delFriendIDListFromCacheReq) if _, err := client.DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{UserID: req.ToUserID}); err != nil {
if err != nil { return nil, err
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache failed", err.Error())
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
} }
if respPb.CommonResp.ErrCode != 0 { if _, err := client.DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{UserID: req.FromUserID}); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache failed", respPb.CommonResp.String()) return nil, err
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
} }
delFriendIDListFromCacheReq.UserID = req.CommID.FromUserID if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.ToUserID); err != nil {
respPb, err = client.DelFriendIDListFromCache(context.Background(), delFriendIDListFromCacheReq) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "userID", req.ToUserID)
if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache failed", err.Error())
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
} }
if respPb.CommonResp.ErrCode != 0 { if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache failed", respPb.CommonResp.String()) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "userID", req.FromUserID)
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
} }
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.CommID.ToUserID); err != nil { chat.FriendAddedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.FromUserID, req.ToUserID)
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.ToUserID)
}
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.CommID.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.FromUserID)
}
chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID)
} }
} }
@ -380,329 +299,174 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
} else if req.HandleResult == constant.FriendResponseRefuse { } else if req.HandleResult == constant.FriendResponseRefuse {
chat.FriendApplicationRejectedNotification(req) chat.FriendApplicationRejectedNotification(req)
} else { } else {
log.Error(req.CommID.OperationID, "HandleResult failed ", req.HandleResult) trace_log.SetCtxInfo(ctx, utils.GetSelfFuncName(), nil, "handleResult", req.HandleResult)
} }
return resp, nil
log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok")
return &pbFriend.AddFriendResponseResp{CommonResp: &sdkws.CommonResp{}}, nil
} }
func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.DeleteFriendResp, error) { func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.DeleteFriendResp, error) {
log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) resp := &pbFriend.DeleteFriendResp{}
//Parse token, to find current user information if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { return nil, err
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID)
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
err := imdb.DeleteSingleFriendInfo(req.CommID.FromUserID, req.CommID.ToUserID) if err := s.friendModel.Delete(ctx, req.FromUserID, req.ToUserID); err != nil {
return nil, err
}
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "DeleteSingleFriendInfo failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) return nil, err
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok") _, err = pbCache.NewCacheClient(etcdConn).DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{UserID: req.FromUserID})
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID, config.Config.Etcd.UserName, config.Config.Etcd.Password)
if etcdConn == nil {
errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrInternalServer.ErrCode, ErrMsg: errMsg}}, nil
}
client := pbCache.NewCacheClient(etcdConn)
respPb, err := client.DelFriendIDListFromCache(context.Background(), &pbCache.DelFriendIDListFromCacheReq{OperationID: req.CommID.OperationID, UserID: req.CommID.FromUserID})
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache rpc failed", err.Error()) return nil, err
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
} }
if respPb.CommonResp.ErrCode != 0 { if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "DelFriendIDListFromCache failed", respPb.CommonResp.String()) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "DelAllFriendsInfoFromCache", req.FromUserID)
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
} }
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.CommID.FromUserID); err != nil { if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.ToUserID); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.FromUserID) trace_log.SetCtxInfo(ctx, "DelAllFriendsInfoFromCache", err, "DelAllFriendsInfoFromCache", req.ToUserID)
}
if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.CommID.ToUserID); err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.FromUserID)
} }
chat.FriendDeletedNotification(req) chat.FriendDeletedNotification(req)
return &pbFriend.DeleteFriendResp{CommonResp: &sdkws.CommonResp{}}, nil return resp, nil
} }
func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) {
log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) resp := &pbFriend.GetBlacklistResp{}
if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { return nil, err
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID)
return &pbFriend.GetBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
blackIDList, err := rocksCache.GetBlackListFromCache(ctx, req.FromUserID)
blackIDList, err := rocksCache.GetBlackListFromCache(ctx, req.CommID.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "GetBlackListByUID failed ", err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.GetBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
var (
userInfoList []*sdkws.PublicUserInfo
)
for _, userID := range blackIDList { for _, userID := range blackIDList {
user, err := rocksCache.GetUserInfoFromCache(ctx, userID) user, err := rocksCache.GetUserInfoFromCache(ctx, userID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "GetUserByUserID failed ", err.Error(), userID) trace_log.SetCtxInfo(ctx, "GetUserInfoFromCache", err, "userID", userID)
continue continue
} }
var blackUserInfo sdkws.PublicUserInfo var blackUserInfo sdkws.PublicUserInfo
utils.CopyStructFields(&blackUserInfo, user) utils.CopyStructFields(&blackUserInfo, user)
userInfoList = append(userInfoList, &blackUserInfo) resp.BlackUserInfoList = append(resp.BlackUserInfoList, &blackUserInfo)
} }
log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok ", pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}) return resp, nil
return &pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}, nil
} }
func (s *friendServer) SetFriendRemark(ctx context.Context, req *pbFriend.SetFriendRemarkReq) (*pbFriend.SetFriendRemarkResp, error) { func (s *friendServer) SetFriendRemark(ctx context.Context, req *pbFriend.SetFriendRemarkReq) (*pbFriend.SetFriendRemarkResp, error) {
log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) resp := &pbFriend.SetFriendRemarkResp{}
//Parse token, to find current user information if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { return nil, err
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID)
return &pbFriend.SetFriendRemarkResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
if err := s.friendModel.UpdateRemark(ctx, req.FromUserID, req.ToUserID, req.Remark); err != nil {
err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.ToUserID, req.Remark) return nil, err
if err != nil {
log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", req.CommID.FromUserID, req.CommID.ToUserID, req.Remark, err.Error())
return &pbFriend.SetFriendRemarkResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") if err := rocksCache.DelAllFriendsInfoFromCache(ctx, req.FromUserID); err != nil {
err = rocksCache.DelAllFriendsInfoFromCache(ctx, req.CommID.FromUserID) return nil, err
if err != nil {
log.NewError(req.CommID.OperationID, "DelAllFriendInfoFromCache failed ", req.CommID.FromUserID, err.Error())
return &pbFriend.SetFriendRemarkResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
chat.FriendRemarkSetNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) chat.FriendRemarkSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.FromUserID, req.ToUserID)
return &pbFriend.SetFriendRemarkResp{CommonResp: &sdkws.CommonResp{}}, nil return resp, nil
} }
func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.RemoveBlacklistResp, error) { func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.RemoveBlacklistResp, error) {
log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) resp := &pbFriend.RemoveBlacklistResp{}
//Parse token, to find current user information //Parse token, to find current user information
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
err := imdb.RemoveBlackList(req.CommID.FromUserID, req.CommID.ToUserID) if err := s.blackModel.Delete(ctx, []*imdb.Black{{OwnerUserID: req.FromUserID, BlockUserID: req.ToUserID}}); err != nil {
return nil, err
}
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "RemoveBlackList failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) return nil, err
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok ") _, err = pbCache.NewCacheClient(etcdConn).DelBlackIDListFromCache(context.Background(), &pbCache.DelBlackIDListFromCacheReq{UserID: req.FromUserID})
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID, config.Config.Etcd.UserName, config.Config.Etcd.Password)
if etcdConn == nil {
errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrInternalServer.ErrCode, ErrMsg: errMsg}}, nil
}
cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.DelBlackIDListFromCache(context.Background(), &pbCache.DelBlackIDListFromCacheReq{UserID: req.CommID.FromUserID, OperationID: req.CommID.OperationID})
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "DelBlackIDListFromCache rpc call failed ", err.Error()) return nil, err
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: 500, ErrMsg: "ReduceBlackUserFromCache rpc call failed"}}, nil
}
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, "DelBlackIDListFromCache rpc logic call failed ", cacheResp.CommonResp.String())
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}, nil
} }
chat.BlackDeletedNotification(req) chat.BlackDeletedNotification(req)
return &pbFriend.RemoveBlacklistResp{CommonResp: &sdkws.CommonResp{}}, nil return resp, nil
} }
func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) {
log.NewInfo("IsInBlackList args ", req.String()) resp := &pbFriend.IsInBlackListResp{}
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.IsInBlackListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
blackIDList, err := rocksCache.GetBlackListFromCache(ctx, req.CommID.FromUserID) blackIDList, err := rocksCache.GetBlackListFromCache(ctx, req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.IsInBlackListResp{CommonResp: &sdkws.CommonResp{ErrMsg: err.Error(), ErrCode: constant.ErrDB.ErrCode}}, nil
} }
var isInBlacklist bool resp.Response = utils.IsContain(req.ToUserID, blackIDList)
if utils.IsContain(req.CommID.ToUserID, blackIDList) { return resp, nil
isInBlacklist = true
}
log.NewInfo(req.CommID.OperationID, "IsInBlackList rpc ok ", pbFriend.IsInBlackListResp{Response: isInBlacklist})
return &pbFriend.IsInBlackListResp{Response: isInBlacklist}, nil
} }
func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) { func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) {
log.NewInfo(req.CommID.OperationID, req.String()) resp := &pbFriend.IsFriendResp{}
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.IsFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
friendIDList, err := rocksCache.GetFriendIDListFromCache(ctx, req.CommID.FromUserID) friendIDList, err := rocksCache.GetFriendIDListFromCache(ctx, req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.IsFriendResp{CommonResp: &sdkws.CommonResp{ErrMsg: err.Error(), ErrCode: constant.ErrDB.ErrCode}}, nil
} }
var isFriend bool resp.Response = utils.IsContain(req.ToUserID, friendIDList)
if utils.IsContain(req.CommID.ToUserID, friendIDList) { return resp, nil
isFriend = true
}
log.NewInfo(req.CommID.OperationID, pbFriend.IsFriendResp{Response: isFriend})
return &pbFriend.IsFriendResp{Response: isFriend}, nil
} }
func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) {
log.NewInfo("GetFriendList args ", req.String()) resp := &pbFriend.GetFriendListResp{}
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.GetFriendListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
friendList, err := rocksCache.GetAllFriendsInfoFromCache(ctx, req.CommID.FromUserID) friendList, err := rocksCache.GetAllFriendsInfoFromCache(ctx, req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache failed", err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.GetFriendListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
var userInfoList []*sdkws.FriendInfo var userInfoList []*sdkws.FriendInfo
for _, friendUser := range friendList { for _, friendUser := range friendList {
friendUserInfo := sdkws.FriendInfo{FriendUser: &sdkws.UserInfo{}} friendUserInfo := sdkws.FriendInfo{FriendUser: &sdkws.UserInfo{}}
cp.FriendDBCopyOpenIM(&friendUserInfo, friendUser) cp.FriendDBCopyOpenIM(&friendUserInfo, friendUser)
log.NewDebug(req.CommID.OperationID, "friends : ", friendUser, "openim friends: ", friendUserInfo)
userInfoList = append(userInfoList, &friendUserInfo) userInfoList = append(userInfoList, &friendUserInfo)
} }
log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) return resp, nil
return &pbFriend.GetFriendListResp{FriendInfoList: userInfoList}, nil
} }
// received // received
func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyListReq) (*pbFriend.GetFriendApplyListResp, error) { func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyListReq) (*pbFriend.GetFriendApplyListResp, error) {
log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) resp := &pbFriend.GetFriendApplyListResp{}
//Parse token, to find current user information //Parse token, to find current user information
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.GetFriendApplyListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
// Find the current user friend applications received // Find the current user friend applications received
ApplyUsersInfo, err := imdb.GetReceivedFriendsApplicationListByUserID(req.CommID.FromUserID) applyUsersInfo, err := s.friendRequestModel.FindToUserID(ctx, req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "GetReceivedFriendsApplicationListByUserID ", err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.GetFriendApplyListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
for _, applyUserInfo := range applyUsersInfo {
var appleUserList []*sdkws.FriendRequest
for _, applyUserInfo := range ApplyUsersInfo {
var userInfo sdkws.FriendRequest var userInfo sdkws.FriendRequest
cp.FriendRequestDBCopyOpenIM(&userInfo, &applyUserInfo) cp.FriendRequestDBCopyOpenIM(&userInfo, applyUserInfo)
// utils.CopyStructFields(&userInfo, applyUserInfo) resp.FriendRequestList = append(resp.FriendRequestList, &userInfo)
// u, err := imdb.GetUserByUserID(userInfo.FromUserID)
// if err != nil {
// log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.FromUserID)
// continue
// }
// userInfo.FromNickname = u.Nickname
// userInfo.FromFaceURL = u.FaceURL
// userInfo.FromGender = u.Gender
//
// u, err = imdb.GetUserByUserID(userInfo.ToUserID)
// if err != nil {
// log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.ToUserID)
// continue
// }
// userInfo.ToNickname = u.Nickname
// userInfo.ToFaceURL = u.FaceURL
// userInfo.ToGender = u.Gender
appleUserList = append(appleUserList, &userInfo)
} }
return resp, nil
log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList})
return &pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}, nil
} }
func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSelfApplyListReq) (*pbFriend.GetSelfApplyListResp, error) { func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSelfApplyListReq) (*pbFriend.GetSelfApplyListResp, error) {
log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) resp := &pbFriend.GetSelfApplyListResp{}
//Parse token, to find current user information //Parse token, to find current user information
if !token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) { if err := token_verify.CheckAccessV3(ctx, req.FromUserID); err != nil {
log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return nil, err
return &pbFriend.GetSelfApplyListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil
} }
// Find the self add other userinfo // Find the self add other userinfo
usersInfo, err := imdb.GetSendFriendApplicationListByUserID(req.CommID.FromUserID) usersInfo, err := s.friendRequestModel.FindFromUserID(ctx, req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "GetSendFriendApplicationListByUserID failed ", err.Error(), req.CommID.FromUserID) return nil, err
return &pbFriend.GetSelfApplyListResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
var selfApplyOtherUserList []*sdkws.FriendRequest
for _, selfApplyOtherUserInfo := range usersInfo { for _, selfApplyOtherUserInfo := range usersInfo {
var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo
cp.FriendRequestDBCopyOpenIM(&userInfo, &selfApplyOtherUserInfo) cp.FriendRequestDBCopyOpenIM(&userInfo, selfApplyOtherUserInfo)
//u, err := imdb.GetUserByUserID(userInfo.FromUserID) resp.FriendRequestList = append(resp.FriendRequestList, &userInfo)
//if err != nil {
// log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.FromUserID)
// continue
//}
//userInfo.FromNickname = u.Nickname
//userInfo.FromFaceURL = u.FaceURL
//userInfo.FromGender = u.Gender
//
//u, err = imdb.GetUserByUserID(userInfo.ToUserID)
//if err != nil {
// log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.ToUserID)
// continue
//}
//userInfo.ToNickname = u.Nickname
//userInfo.ToFaceURL = u.FaceURL
//userInfo.ToGender = u.Gender
selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo)
} }
log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) return resp, nil
return &pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}, nil
} }
////
//func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) {
// return nil, nil
//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String())
//// var (
//// isInBlackList int32
//// // isFriend int32
//// comment string
//// )
////
//// friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID)
//// if err != nil {
//// log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error())
//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil
//// // isFriend = constant.FriendFlag
//// }
//// comment = friendShip.Remark
////
//// friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID)
//// if err != nil {
//// log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error())
//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil
//// }
////
//// err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID)
//// if err == nil {
//// isInBlackList = constant.BlackListFlag
//// }
////
//// resp := pbFriend.GetFriendInfoResp{ErrCode: 0, ErrMsg: "",}
////
//// utils.CopyStructFields(resp.FriendInfoList, friendUserInfo)
//// resp.Data.IsBlack = isInBlackList
//// resp.Data.OwnerUserID = req.CommID.FromUserID
//// resp.Data.Remark = comment
//// resp.Data.CreateTime = friendUserInfo.CreateTime
////
//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp)
//// return &resp, nil
////
//}

View File

@ -8,3 +8,7 @@ import (
func GetUserInfo(ctx context.Context, userID string) (interface{}, error) { func GetUserInfo(ctx context.Context, userID string) (interface{}, error) {
return nil, errors.New("TODO:GetUserInfo") return nil, errors.New("TODO:GetUserInfo")
} }
func GetUserInfoBatch(ctx context.Context, userIDs []string) (interface{}, error) {
return nil, errors.New("TODO:GetUserInfo")
}

View File

@ -5,8 +5,11 @@ import (
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/tools" "Open_IM/pkg/common/tools"
pbGroup "Open_IM/pkg/proto/group" pbGroup "Open_IM/pkg/proto/group"
sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"math/big"
"strconv"
"time" "time"
) )
@ -19,16 +22,12 @@ func getDBGroupRequest(ctx context.Context, req *pbGroup.GroupApplicationRespons
return dbGroupRequest return dbGroupRequest
} }
func getDBGroupMember(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (dbGroupMember *imdb.GroupMember) { func getDBGroupMember(ctx context.Context, groupID, userID string) (dbGroupMember *imdb.GroupMember, err error) {
dbGroupMember = &imdb.GroupMember{} dbGroupMember = &imdb.GroupMember{}
utils.CopyStructFields(&dbGroupRequest, req)
dbGroupRequest.UserID = req.FromUserID
dbGroupRequest.HandleUserID = tools.OpUserID(ctx)
dbGroupRequest.HandledTime = time.Now()
member := imdb.GroupMember{} member := imdb.GroupMember{}
member.GroupID = req.GroupID member.GroupID = groupID
member.UserID = req.FromUserID member.UserID = userID
member.RoleLevel = constant.GroupOrdinaryUsers member.RoleLevel = constant.GroupOrdinaryUsers
member.OperatorUserID = tools.OpUserID(ctx) member.OperatorUserID = tools.OpUserID(ctx)
@ -38,5 +37,20 @@ func getDBGroupMember(ctx context.Context, req *pbGroup.GroupApplicationResponse
member.InviterUserID = request.InviterUserID member.InviterUserID = request.InviterUserID
member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0) member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
return dbGroupRequest return dbGroupMember, nil
}
func getUsersInfo(ctx context.Context, userIDs []string) ([]*sdk.UserInfo, error) {
return nil, nil
}
func genGroupID(ctx context.Context, groupID string) string {
if groupID != "" {
return groupID
}
groupID = utils.Md5(tools.OperationID(ctx) + strconv.FormatInt(time.Now().UnixNano(), 10))
bi := big.NewInt(0)
bi.SetString(groupID[0:8], 16)
groupID = bi.String()
return groupID
} }

View File

@ -24,7 +24,6 @@ import (
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"errors" "errors"
"math/big"
"net" "net"
"strconv" "strconv"
"strings" "strings"
@ -121,48 +120,36 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if err := token_verify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { if err := token_verify.CheckAccessV3(ctx, req.OwnerUserID); err != nil {
return nil, err return nil, err
} }
var groupOwnerNum int if req.OwnerUserID == "" {
return nil, constant.ErrArgs.Wrap("no group owner")
}
var userIDs []string var userIDs []string
for _, info := range req.InitMemberList { for _, ordinaryUserID := range req.InitMemberList {
if info.RoleLevel == constant.GroupOwner { userIDs = append(userIDs, ordinaryUserID)
groupOwnerNum++
}
userIDs = append(userIDs, info.UserID)
} }
if req.OwnerUserID != "" { userIDs = append(userIDs, req.OwnerUserID)
groupOwnerNum++ for _, adminUserID := range req.AdminUserIDs {
userIDs = append(userIDs, req.OwnerUserID) userIDs = append(userIDs, adminUserID)
} }
if groupOwnerNum != 1 { if utils.IsRepeatID(userIDs) {
return nil, constant.ErrArgs.Wrap("groupOwnerNum != 1")
}
if utils.IsRepeatStringSlice(userIDs) {
return nil, constant.ErrArgs.Wrap("group member is repeated") return nil, constant.ErrArgs.Wrap("group member is repeated")
} }
users, err := rocksCache.GetUserInfoFromCacheBatch(ctx, userIDs)
users, err := getUsersInfo(ctx, userIDs)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if len(users) != len(userIDs) {
return nil, constant.ErrDatabase.Wrap("len(users from cache) != len(userIDs)") userMap := make(map[string]*open_im_sdk.UserInfo)
}
userMap := make(map[string]*imdb.User)
for i, user := range users { for i, user := range users {
userMap[user.UserID] = users[i] userMap[user.UserID] = users[i]
} }
if err := s.DelGroupAndUserCache(ctx, "", userIDs); err != nil {
return nil, err
}
if err := callbackBeforeCreateGroup(ctx, req); err != nil { if err := callbackBeforeCreateGroup(ctx, req); err != nil {
return nil, err return nil, err
} }
groupId := req.GroupInfo.GroupID groupId := genGroupID(ctx, req.GroupInfo.GroupID)
if groupId == "" {
groupId = utils.Md5(tools.OperationID(ctx) + strconv.FormatInt(time.Now().UnixNano(), 10))
bi := big.NewInt(0)
bi.SetString(groupId[0:8], 16)
groupId = bi.String()
}
groupInfo := imdb.Group{} groupInfo := imdb.Group{}
utils.CopyStructFields(&groupInfo, req.GroupInfo) utils.CopyStructFields(&groupInfo, req.GroupInfo)
groupInfo.CreatorUserID = tools.OpUserID(ctx) groupInfo.CreatorUserID = tools.OpUserID(ctx)
@ -171,7 +158,9 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if groupInfo.NotificationUpdateTime.Unix() < 0 { if groupInfo.NotificationUpdateTime.Unix() < 0 {
groupInfo.NotificationUpdateTime = utils.UnixSecondToTime(0) groupInfo.NotificationUpdateTime = utils.UnixSecondToTime(0)
} }
if req.GroupInfo.GroupType != constant.SuperGroup { if req.GroupInfo.GroupType != constant.SuperGroup {
var groupMembers []*imdb.GroupMember var groupMembers []*imdb.GroupMember
joinGroup := func(userID string, roleLevel int32) error { joinGroup := func(userID string, roleLevel int32) error {
groupMember := &imdb.GroupMember{GroupID: groupId, RoleLevel: roleLevel, OperatorUserID: tools.OpUserID(ctx), JoinSource: constant.JoinByInvitation, InviterUserID: tools.OpUserID(ctx)} groupMember := &imdb.GroupMember{GroupID: groupId, RoleLevel: roleLevel, OperatorUserID: tools.OpUserID(ctx), JoinSource: constant.JoinByInvitation, InviterUserID: tools.OpUserID(ctx)}
@ -193,9 +182,11 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
return nil, err return nil, err
} }
} }
if err := (*imdb.GroupMember)(nil).Create(ctx, groupMembers); err != nil { if err := (*imdb.GroupMember)(nil).Create(ctx, groupMembers); err != nil {
return nil, err return nil, err
} }
} else { } else {
if err := db.DB.CreateSuperGroup(groupId, userIDs, len(userIDs)); err != nil { if err := db.DB.CreateSuperGroup(groupId, userIDs, len(userIDs)); err != nil {
return nil, err return nil, err
@ -673,30 +664,15 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup
return nil, err return nil, err
} }
if req.HandleResult == constant.GroupResponseAgree { if req.HandleResult == constant.GroupResponseAgree {
user, err := imdb.GetUserByUserID(req.FromUserID) member, err := getDBGroupMember(ctx, req.GroupID, req.FromUserID)
if err != nil { if err != nil {
return nil, err return nil, err
} }
request, err := (&imdb.GroupRequest{}).Take(ctx, req.GroupID, req.FromUserID) err = CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), member, groupInfo.Ex)
if err != nil { if err != nil {
return nil, err return nil, err
} }
member := imdb.GroupMember{} err = (&imdb.GroupMember{}).Create(ctx, []*imdb.GroupMember{member})
member.GroupID = req.GroupID
member.UserID = req.FromUserID
member.RoleLevel = constant.GroupOrdinaryUsers
member.OperatorUserID = tools.OpUserID(ctx)
member.FaceURL = user.FaceURL
member.Nickname = user.Nickname
member.JoinSource = request.JoinSource
member.InviterUserID = request.InviterUserID
member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
err = CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &member, groupInfo.Ex)
if err != nil {
return nil, err
}
err = (&imdb.GroupMember{}).Create(ctx, []*imdb.GroupMember{&member})
if err != nil { if err != nil {
return nil, err return nil, err
} }

224
internal/utils/convert.go Normal file
View File

@ -0,0 +1,224 @@
package utils
import (
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
sdk "Open_IM/pkg/proto/sdk_ws"
utils2 "Open_IM/pkg/utils"
utils "github.com/OpenIMSDK/open_utils"
"time"
)
func getUsersInfo(userIDs []string) ([]*sdk.UserInfo, error) {
return nil, nil
}
func getGroupOwnerInfo(groupID string) (*sdk.GroupMemberFullInfo, error) {
return nil, nil
}
func getNumberOfGroupMember(groupID string) (int32, error) {
return 0, nil
}
type DBFriend struct {
*imdb.Friend
}
type PBFriend struct {
*sdk.FriendInfo
}
func (db *DBFriend) convert() (*sdk.FriendInfo, error) {
pbFriend := &sdk.FriendInfo{FriendUser: &sdk.UserInfo{}}
utils.CopyStructFields(pbFriend, db)
user, err := getUsersInfo([]string{db.FriendUserID})
if err != nil {
return nil, err
}
utils2.CopyStructFields(pbFriend.FriendUser, user[0])
pbFriend.CreateTime = uint32(db.CreateTime.Unix())
pbFriend.FriendUser.CreateTime = uint32(db.CreateTime.Unix())
return pbFriend, nil
}
func (pb *PBFriend) convert() (*imdb.Friend, error) {
dbFriend := &imdb.Friend{}
utils2.CopyStructFields(dbFriend, pb)
dbFriend.FriendUserID = pb.FriendUser.UserID
dbFriend.CreateTime = utils2.UnixSecondToTime(int64(pb.CreateTime))
return dbFriend, nil
}
type DBFriendRequest struct {
*imdb.FriendRequest
}
type PBFriendRequest struct {
*sdk.FriendRequest
}
func (pb *PBFriendRequest) convert() (*imdb.FriendRequest, error) {
dbFriendRequest := &imdb.FriendRequest{}
utils.CopyStructFields(dbFriendRequest, pb)
dbFriendRequest.CreateTime = utils.UnixSecondToTime(int64(pb.CreateTime))
dbFriendRequest.HandleTime = utils.UnixSecondToTime(int64(pb.HandleTime))
return dbFriendRequest, nil
}
func (db *DBFriendRequest) convert() (*sdk.FriendRequest, error) {
pbFriendRequest := &sdk.FriendRequest{}
utils.CopyStructFields(pbFriendRequest, db)
user, err := getUsersInfo([]string{db.FromUserID})
if err != nil {
return nil, err
}
pbFriendRequest.FromNickname = user[0].Nickname
pbFriendRequest.FromFaceURL = user[0].FaceURL
pbFriendRequest.FromGender = user[0].Gender
user, err = getUsersInfo([]string{db.ToUserID})
if err != nil {
return nil, err
}
pbFriendRequest.ToNickname = user[0].Nickname
pbFriendRequest.ToFaceURL = user[0].FaceURL
pbFriendRequest.ToGender = user[0].Gender
pbFriendRequest.CreateTime = uint32(db.CreateTime.Unix())
pbFriendRequest.HandleTime = uint32(db.HandleTime.Unix())
return pbFriendRequest, nil
}
type DBBlack struct {
*imdb.Black
}
type PBBlack struct {
*sdk.BlackInfo
}
func (pb *PBBlack) convert() (*imdb.Black, error) {
dbBlack := &imdb.Black{}
dbBlack.BlockUserID = pb.BlackUserInfo.UserID
dbBlack.CreateTime = utils.UnixSecondToTime(int64(pb.CreateTime))
return dbBlack, nil
}
func (db *DBBlack) convert() (*sdk.BlackInfo, error) {
pbBlack := &sdk.BlackInfo{}
utils.CopyStructFields(pbBlack, db)
pbBlack.CreateTime = uint32(db.CreateTime.Unix())
user, err := getUsersInfo([]string{db.BlockUserID})
if err != nil {
return nil, err
}
utils.CopyStructFields(pbBlack.BlackUserInfo, user)
return pbBlack, nil
}
type DBGroup struct {
*imdb.Group
}
type PBGroup struct {
*sdk.GroupInfo
}
func (pb *PBGroup) convert() (*imdb.Group, error) {
dst := &imdb.Group{}
utils.CopyStructFields(dst, pb)
return dst, nil
}
func (db *DBGroup) convert() (*sdk.GroupInfo, error) {
dst := &sdk.GroupInfo{}
utils.CopyStructFields(dst, db)
user, err := getGroupOwnerInfo(db.GroupID)
if err != nil {
return nil, err
}
dst.OwnerUserID = user.UserID
memberCount, err := getNumberOfGroupMember(db.GroupID)
if err != nil {
return nil, err
}
dst.MemberCount = uint32(memberCount)
dst.CreateTime = uint32(db.CreateTime.Unix())
dst.NotificationUpdateTime = uint32(db.NotificationUpdateTime.Unix())
if db.NotificationUpdateTime.Unix() < 0 {
dst.NotificationUpdateTime = 0
}
return dst, nil
}
type DBGroupMember struct {
*imdb.GroupMember
}
type PBGroupMember struct {
*sdk.GroupMemberFullInfo
}
func (pb *PBGroupMember) convert() (*imdb.GroupMember, error) {
dst := &imdb.GroupMember{}
utils.CopyStructFields(dst, pb)
dst.JoinTime = utils.UnixSecondToTime(int64(pb.JoinTime))
dst.MuteEndTime = utils.UnixSecondToTime(int64(pb.MuteEndTime))
return dst, nil
}
func (db *DBGroupMember) convert() (*sdk.GroupMemberFullInfo, error) {
dst := &sdk.GroupMemberFullInfo{}
utils.CopyStructFields(dst, db)
user, err := getUsersInfo([]string{db.UserID})
if err != nil {
return nil, err
}
dst.AppMangerLevel = user[0].AppMangerLevel
dst.JoinTime = int32(db.JoinTime.Unix())
if db.JoinTime.Unix() < 0 {
dst.JoinTime = 0
}
dst.MuteEndTime = uint32(db.MuteEndTime.Unix())
if dst.MuteEndTime < uint32(time.Now().Unix()) {
dst.MuteEndTime = 0
}
return dst, nil
}
type DBGroupRequest struct {
*imdb.GroupRequest
}
type PBGroupRequest struct {
*sdk.GroupRequest
}
func (pb *PBGroupRequest) convert() (*imdb.GroupRequest, error) {
dst := &imdb.GroupRequest{}
utils.CopyStructFields(dst, pb)
dst.ReqTime = utils.UnixSecondToTime(int64(pb.ReqTime))
dst.HandledTime = utils.UnixSecondToTime(int64(pb.HandleTime))
return dst, nil
}
func (db *DBGroupRequest) convert() (*sdk.GroupRequest, error) {
dst := &sdk.GroupRequest{}
utils.CopyStructFields(dst, db)
dst.ReqTime = uint32(db.ReqTime.Unix())
dst.HandleTime = uint32(db.HandledTime.Unix())
return dst, nil
}
func UserOpenIMCopyDB(dst *imdb.User, src *open_im_sdk.UserInfo) {
utils.CopyStructFields(dst, src)
dst.Birth, _ = utils.TimeStringToTime(src.BirthStr)
dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime))
}
func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *imdb.User) {
utils.CopyStructFields(dst, src)
dst.CreateTime = uint32(src.CreateTime.Unix())
//dst.Birth = uint32(src.Birth.Unix())
dst.BirthStr = utils2.TimeToString(src.Birth)
}
func UserDBCopyOpenIMPublicUser(dst *open_im_sdk.PublicUserInfo, src *imdb.User) {
utils.CopyStructFields(dst, src)
}

View File

@ -1,128 +1,267 @@
package base_info package base_info
import open_im_sdk "Open_IM/pkg/proto/sdk_ws" //type ParamsCommFriend struct {
// OperationID string `json:"operationID" binding:"required"`
// ToUserID string `json:"toUserID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//
//type AddBlacklistReq struct {
// ParamsCommFriend
//}
//type AddBlacklistResp struct {
// CommResp
//}
//
//type ImportFriendReq struct {
// FriendUserIDList []string `json:"friendUserIDList" binding:"required"`
// OperationID string `json:"operationID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//type UserIDResult struct {
// UserID string `json:"userID"`
// Result int32 `json:"result"`
//}
//type ImportFriendResp struct {
// CommResp
// UserIDResultList []UserIDResult `json:"data"`
//}
//
//type AddFriendReq struct {
// ParamsCommFriend
// ReqMsg string `json:"reqMsg"`
//}
//type AddFriendResp struct {
// CommResp
//}
//
//type AddFriendResponseReq struct {
// ParamsCommFriend
// Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"`
// HandleMsg string `json:"handleMsg"`
//}
//type AddFriendResponseResp struct {
// CommResp
//}
//
//type DeleteFriendReq struct {
// ParamsCommFriend
//}
//type DeleteFriendResp struct {
// CommResp
//}
//
//type GetBlackListReq struct {
// OperationID string `json:"operationID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//type GetBlackListResp struct {
// CommResp
// BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
////type PublicUserInfo struct {
//// UserID string `json:"userID"`
//// Nickname string `json:"nickname"`
//// FaceUrl string `json:"faceUrl"`
//// Gender int32 `json:"gender"`
////}
//
//type SetFriendRemarkReq struct {
// ParamsCommFriend
// Remark string `json:"remark"`
//}
//type SetFriendRemarkResp struct {
// CommResp
//}
//
//type RemoveBlacklistReq struct {
// ParamsCommFriend
//}
//type RemoveBlacklistResp struct {
// CommResp
//}
//
//type IsFriendReq struct {
// ParamsCommFriend
//}
//type Response struct {
// Friend bool `json:"isFriend"`
//}
//type IsFriendResp struct {
// CommResp
// Response Response `json:"data"`
//}
//
//type GetFriendsInfoReq struct {
// ParamsCommFriend
//}
//type GetFriendsInfoResp struct {
// CommResp
// FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
//type GetFriendListReq struct {
// OperationID string `json:"operationID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//type GetFriendListResp struct {
// CommResp
// FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
//type GetFriendApplyListReq struct {
// OperationID string `json:"operationID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//type GetFriendApplyListResp struct {
// CommResp
// FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
//
//type GetSelfApplyListReq struct {
// OperationID string `json:"operationID" binding:"required"`
// FromUserID string `json:"fromUserID" binding:"required"`
//}
//type GetSelfApplyListResp struct {
// CommResp
// FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
//}
type ParamsCommFriend struct { type FriendInfo struct {
OperationID string `json:"operationID" binding:"required"` UserID string `json:"userID"`
ToUserID string `json:"toUserID" binding:"required"` Nickname string `json:"nickname"`
FromUserID string `json:"fromUserID" binding:"required"` FaceURL string `json:"faceURL"`
Gender int32 `json:"gender"`
Ex string `json:"ex"`
}
type PublicUserInfo struct {
UserID string `json:"userID"`
Nickname string `json:"nickname"`
FaceURL string `json:"faceURL"`
Gender int32 `json:"gender"`
Ex string `json:"ex"`
}
type FriendRequest struct {
FromUserID string `json:"fromUserID"`
FromNickname string `json:"fromNickname"`
FromFaceURL string `json:"fromFaceURL"`
FromGender int32 `json:"fromGender"`
ToUserID string `json:"toUserID"`
ToNickname string `json:"toNickname"`
ToFaceURL string `json:"toFaceURL"`
ToGender int32 `json:"toGender"`
HandleResult int32 `json:"handleResult"`
ReqMsg string `json:"reqMsg"`
CreateTime uint32 `json:"createTime"`
HandlerUserID string `json:"handlerUserID"`
HandleMsg string `json:"handleMsg"`
HandleTime uint32 `json:"handleTime"`
Ex string `json:"ex"`
} }
type AddBlacklistReq struct { type AddBlacklistReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
} }
type AddBlacklistResp struct { type AddBlacklistResp struct {
CommResp
} }
type ImportFriendReq struct { type ImportFriendReq struct {
FriendUserIDList []string `json:"friendUserIDList" binding:"required"` FriendUserIDList []string `json:"friendUserIDList" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"`
} }
type UserIDResult struct {
UserID string `json:"userID"`
Result int32 `json:"result"`
}
type ImportFriendResp struct { type ImportFriendResp struct {
CommResp //CommResp
UserIDResultList []UserIDResult `json:"data"`
} }
type AddFriendReq struct { type AddFriendReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
ReqMsg string `json:"reqMsg"` FromUserID string `json:"fromUserID" binding:"required"`
ReqMsg string `json:"reqMsg"`
} }
type AddFriendResp struct { type AddFriendResp struct {
CommResp //CommResp
} }
type AddFriendResponseReq struct { type AddFriendResponseReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"` FromUserID string `json:"fromUserID" binding:"required"`
HandleMsg string `json:"handleMsg"` HandleResult int32 `json:"flag" binding:"required,oneof=-1 0 1"`
HandleMsg string `json:"handleMsg"`
} }
type AddFriendResponseResp struct { type AddFriendResponseResp struct {
CommResp
} }
type DeleteFriendReq struct { type DeleteFriendReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
} }
type DeleteFriendResp struct { type DeleteFriendResp struct {
CommResp
} }
type GetBlackListReq struct { type GetBlackListReq struct {
OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
} }
type GetBlackListResp struct { type GetBlackListResp struct {
CommResp BlackUserInfoList []PublicUserInfo `json:"blackUserInfoList"`
BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
} }
//type PublicUserInfo struct {
// UserID string `json:"userID"`
// Nickname string `json:"nickname"`
// FaceUrl string `json:"faceUrl"`
// Gender int32 `json:"gender"`
//}
type SetFriendRemarkReq struct { type SetFriendRemarkReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
Remark string `json:"remark"` FromUserID string `json:"fromUserID" binding:"required"`
Remark string `json:"remark"`
} }
type SetFriendRemarkResp struct { type SetFriendRemarkResp struct {
CommResp
} }
type RemoveBlackListReq struct { type RemoveBlacklistReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
} }
type RemoveBlackListResp struct { type RemoveBlacklistResp struct {
CommResp
} }
type IsFriendReq struct { type IsFriendReq struct {
ParamsCommFriend ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
} }
type Response struct { type Response struct {
Friend bool `json:"isFriend"` Friend bool `json:"isFriend"`
} }
type IsFriendResp struct { type IsFriendResp struct {
CommResp
Response Response `json:"data"` Response Response `json:"data"`
} }
type GetFriendsInfoReq struct {
ParamsCommFriend
}
type GetFriendsInfoResp struct {
CommResp
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetFriendListReq struct { type GetFriendListReq struct {
OperationID string `json:"operationID" binding:"required"` OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"`
} }
type GetFriendListResp struct { type GetFriendListResp struct {
CommResp OwnerUserID string `json:"ownerUserID"`
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` Remark string `json:"remark"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"` CreateTime uint32 `json:"createTime"`
AddSource int32 `json:"addSource"`
OperatorUserID string `json:"operatorUserID"`
Ex string `json:"ex"`
//FriendUser *UserInfo // TODO
} }
type GetFriendApplyListReq struct { type GetFriendApplyListReq struct {
OperationID string `json:"operationID" binding:"required"` OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"`
} }
type GetFriendApplyListResp struct { type GetFriendApplyListResp struct {
CommResp FriendRequestList []FriendRequest `json:"friendRequestList"`
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
} }
type GetSelfApplyListReq struct { type GetSelfApplyListReq struct {
@ -130,7 +269,5 @@ type GetSelfApplyListReq struct {
FromUserID string `json:"fromUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"`
} }
type GetSelfApplyListResp struct { type GetSelfApplyListResp struct {
CommResp FriendRequestList []FriendRequest `json:"friendRequestList"`
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
} }

View File

@ -1,83 +1,83 @@
package mysql package mysql
import ( //import (
"fmt" // "fmt"
"time" // "time"
) //)
//
func InsertToFriend(toInsertFollow *Friend) error { //func InsertToFriend(toInsertFollow *Friend) error {
toInsertFollow.CreateTime = time.Now() // toInsertFollow.CreateTime = time.Now()
err := FriendDB.Table("friends").Create(toInsertFollow).Error // err := FriendDB.Table("friends").Create(toInsertFollow).Error
if err != nil { // if err != nil {
return err // return err
} // }
return nil // return nil
} //}
//
func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { //func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) {
var friend Friend // var friend Friend
err := FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Take(&friend).Error // err := FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Take(&friend).Error
if err != nil { // if err != nil {
return nil, err // return nil, err
} // }
return &friend, err // return &friend, err
} //}
//
func GetFriendListByUserID(OwnerUserID string) ([]Friend, error) { //func GetFriendListByUserID(OwnerUserID string) ([]Friend, error) {
var friends []Friend // var friends []Friend
var x Friend // var x Friend
x.OwnerUserID = OwnerUserID // x.OwnerUserID = OwnerUserID
err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error // err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error
if err != nil { // if err != nil {
return nil, err // return nil, err
} // }
return friends, nil // return friends, nil
} //}
//
func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) { //func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) {
var friendIDList []string // var friendIDList []string
err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Pluck("friend_user_id", &friendIDList).Error // err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Pluck("friend_user_id", &friendIDList).Error
if err != nil { // if err != nil {
return nil, err // return nil, err
} // }
return friendIDList, nil // return friendIDList, nil
} //}
//
func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error { //func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error {
return FriendDB.Exec("update friends set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error // return FriendDB.Exec("update friends set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error
} //}
//
func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error { //func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error {
return FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error // return FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error
} //}
//
type FriendUser struct { //type FriendUser struct {
Friend // Friend
Nickname string `gorm:"column:name;size:255"` // Nickname string `gorm:"column:name;size:255"`
} //}
//
func GetUserFriendsCMS(ownerUserID, friendUserName string, pageNumber, showNumber int32) (friendUserList []*FriendUser, count int64, err error) { //func GetUserFriendsCMS(ownerUserID, friendUserName string, pageNumber, showNumber int32) (friendUserList []*FriendUser, count int64, err error) {
db := FriendDB.Table("friends"). // db := FriendDB.Table("friends").
Select("friends.*, users.name"). // Select("friends.*, users.name").
Where("friends.owner_user_id=?", ownerUserID).Limit(int(showNumber)). // Where("friends.owner_user_id=?", ownerUserID).Limit(int(showNumber)).
Joins("left join users on friends.friend_user_id = users.user_id"). // Joins("left join users on friends.friend_user_id = users.user_id").
Offset(int(showNumber * (pageNumber - 1))) // Offset(int(showNumber * (pageNumber - 1)))
if friendUserName != "" { // if friendUserName != "" {
db = db.Where("users.name like ?", fmt.Sprintf("%%%s%%", friendUserName)) // db = db.Where("users.name like ?", fmt.Sprintf("%%%s%%", friendUserName))
} // }
if err = db.Count(&count).Error; err != nil { // if err = db.Count(&count).Error; err != nil {
return // return
} // }
err = db.Find(&friendUserList).Error // err = db.Find(&friendUserList).Error
return // return
} //}
//
func GetFriendByIDCMS(ownerUserID, friendUserID string) (friendUser *FriendUser, err error) { //func GetFriendByIDCMS(ownerUserID, friendUserID string) (friendUser *FriendUser, err error) {
friendUser = &FriendUser{} // friendUser = &FriendUser{}
err = FriendDB.Table("friends"). // err = FriendDB.Table("friends").
Select("friends.*, users.name"). // Select("friends.*, users.name").
Where("friends.owner_user_id=? and friends.friend_user_id=?", ownerUserID, friendUserID). // Where("friends.owner_user_id=? and friends.friend_user_id=?", ownerUserID, friendUserID).
Joins("left join users on friends.friend_user_id = users.user_id"). // Joins("left join users on friends.friend_user_id = users.user_id").
Take(friendUser).Error // Take(friendUser).Error
return friendUser, err // return friendUser, err
} //}

View File

@ -27,15 +27,14 @@ func (f *Friend) Create(ctx context.Context, friends []*Friend) (err error) {
defer func() { defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends) trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends)
}() }()
err = utils.Wrap(f.db.Create(&friends).Error, "") return utils.Wrap(f.db.Create(&friends).Error, "")
return err
} }
func (f *Friend) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) { func (f *Friend) Delete(ctx context.Context, ownerUserID string, friendUserIDs string) (err error) {
defer func() { defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs) trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs)
}() }()
err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id in (?)", ownerUserID, friendUserIDs).Delete(&Friend{}).Error, "") err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id = ?", ownerUserID, friendUserIDs).Delete(&Friend{}).Error, "")
return err return err
} }
@ -53,17 +52,29 @@ func (f *Friend) Update(ctx context.Context, friends []*Friend) (err error) {
return utils.Wrap(f.db.Updates(&friends).Error, "") return utils.Wrap(f.db.Updates(&friends).Error, "")
} }
func (f *Friend) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) {
defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "remark", remark)
}()
return utils.Wrap(f.db.Model(f).Where("owner_user_id = ? and friend_user_id = ?", ownerUserID, friendUserID).Update("remark", remark).Error, "")
}
func (f *Friend) Find(ctx context.Context, ownerUserID string) (friends []*Friend, err error) { func (f *Friend) Find(ctx context.Context, ownerUserID string) (friends []*Friend, err error) {
defer func() { defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friends", friends) trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friends", friends)
}() }()
err = utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Find(&friends).Error, "") return friends, utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Find(&friends).Error, "")
return friends, err
} }
func (f *Friend) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *Friend, err error) { func (f *Friend) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *Friend, err error) {
friend = &Friend{} friend = &Friend{}
defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "group", *friend) defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "friend", friend)
err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "") return friend, utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "")
return friend, err }
func (f *Friend) FindUserState(ctx context.Context, userID1, userID2 string) (friends []*Friend, err error) {
defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "userID1", userID1, "userID2", userID2)
}()
return friends, utils.Wrap(f.db.Where("(owner_user_id = ? and friend_user_id = ?) or (owner_user_id = ? and friend_user_id = ?)", userID1, userID2, userID2, userID1).Find(&friends).Error, "")
} }

View File

@ -65,13 +65,27 @@ func (f *FriendRequest) Find(ctx context.Context, ownerUserID string) (friends [
return friends, err return friends, err
} }
func (f *FriendRequest) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *FriendRequest, err error) { func (f *FriendRequest) Take(ctx context.Context, fromUserID, toUserID string) (friend *FriendRequest, err error) {
friend = &FriendRequest{} friend = &FriendRequest{}
defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "group", *friend) defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "fromUserID", fromUserID, "toUserID", toUserID, "friend", friend)
err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "") err = utils.Wrap(f.db.Where("from_user_id = ? and to_user_id", fromUserID, toUserID).Take(friend).Error, "")
return friend, err return friend, err
} }
func (f *FriendRequest) FindToUserID(ctx context.Context, toUserID string) (friends []*FriendRequest, err error) {
defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "toUserID", toUserID, "friends", friends)
}()
return friends, utils.Wrap(f.db.Where("to_user_id = ?", toUserID).Find(&friends).Error, "")
}
func (f *FriendRequest) FindFromUserID(ctx context.Context, fromUserID string) (friends []*FriendRequest, err error) {
defer func() {
trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "fromUserID", fromUserID, "friends", friends)
}()
return friends, utils.Wrap(f.db.Where("from_user_id = ?", fromUserID).Find(&friends).Error, "")
}
// who apply to add me // who apply to add me
func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest, error) { func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest, error) {
var usersInfo []FriendRequest var usersInfo []FriendRequest

View File

@ -9,7 +9,6 @@ import (
"Open_IM/pkg/common/trace_log" "Open_IM/pkg/common/trace_log"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"github.com/OpenIMSDK/open_utils"
"time" "time"
go_redis "github.com/go-redis/redis/v8" go_redis "github.com/go-redis/redis/v8"
@ -160,19 +159,6 @@ func CheckAccess(ctx context.Context, OpUserID string, OwnerUserID string) bool
return false return false
} }
func CheckAccessV2(ctx context.Context, OpUserID string, OwnerUserID string) (err error) {
defer func() {
trace_log.SetCtxInfo(ctx, utils.GetFuncName(1), err, "OpUserID", OpUserID, "OwnerUserID", OwnerUserID)
}()
if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) {
return nil
}
if OpUserID == OwnerUserID {
return nil
}
return utils.Wrap(constant.ErrIdentity, open_utils.GetSelfFuncName())
}
func CheckAccessV3(ctx context.Context, OwnerUserID string) (err error) { func CheckAccessV3(ctx context.Context, OwnerUserID string) (err error) {
opUserID := tools.OpUserID(ctx) opUserID := tools.OpUserID(ctx)
defer func() { defer func() {

View File

@ -22,8 +22,8 @@ func NewCtx(c *gin.Context, api string) context.Context {
return context.WithValue(c, TraceLogKey, req) return context.WithValue(c, TraceLogKey, req)
} }
func NewCtx1(c *gin.Context, api, operationID string) context.Context { func NewCtx1(c *gin.Context, api string) context.Context {
req := &ApiInfo{ApiName: api, GinCtx: c, OperationID: operationID, Funcs: &[]FuncInfo{}} req := &ApiInfo{ApiName: api, GinCtx: c, OperationID: c.GetHeader("operationID"), Funcs: &[]FuncInfo{}}
return context.WithValue(c, TraceLogKey, req) return context.WithValue(c, TraceLogKey, req)
} }

File diff suppressed because it is too large Load Diff

View File

@ -3,26 +3,19 @@ import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/friend;friend"; option go_package = "Open_IM/pkg/proto/friend;friend";
package friend; package friend;
message CommID{
string OpUserID = 1;
string OperationID = 2;
string ToUserID = 4;
string FromUserID = 5;
}
message GetFriendsInfoReq{ message GetFriendsInfoReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message GetFriendInfoResp{ message GetFriendInfoResp{
server_api_params.CommonResp commonResp = 1; repeated server_api_params.FriendInfo FriendInfoList = 1;
repeated server_api_params.FriendInfo FriendInfoList = 2;
} }
message AddFriendReq{ message AddFriendReq{
CommID CommID = 1; string ToUserID = 1;
string ReqMsg = 2; string FromUserID = 2;
string ReqMsg = 3;
} }
message AddFriendResp{ message AddFriendResp{
server_api_params.CommonResp commonResp = 1; server_api_params.CommonResp commonResp = 1;
@ -31,115 +24,111 @@ message AddFriendResp{
message ImportFriendReq{ message ImportFriendReq{
repeated string FriendUserIDList = 1; repeated string FriendUserIDList = 1;
string OperationID = 2; string FromUserID = 2;
string FromUserID = 3;
string OpUserID = 4;
}
message UserIDResult{
string UserID = 1;
int32 Result = 2;
} }
message ImportFriendResp{ message ImportFriendResp{
server_api_params.CommonResp commonResp = 1;
repeated UserIDResult UserIDResultList = 2;
} }
message GetFriendApplyListReq{ message GetFriendApplyListReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message GetFriendApplyListResp{ message GetFriendApplyListResp{
server_api_params.CommonResp commonResp = 1; repeated server_api_params.FriendRequest FriendRequestList = 1;
repeated server_api_params.FriendRequest FriendRequestList = 2;
} }
message GetFriendListReq{ message GetFriendListReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message GetFriendListResp{ message GetFriendListResp{
server_api_params.CommonResp commonResp = 1; repeated server_api_params.FriendInfo FriendInfoList = 1;
repeated server_api_params.FriendInfo FriendInfoList = 2;
} }
message AddBlacklistReq{ message AddBlacklistReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message AddBlacklistResp{ message AddBlacklistResp{
server_api_params.CommonResp commonResp = 1;
} }
message RemoveBlacklistReq{ message RemoveBlacklistReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message RemoveBlacklistResp{ message RemoveBlacklistResp{
server_api_params.CommonResp commonResp = 1;
} }
message GetBlacklistReq{ message GetBlacklistReq{
CommID CommID = 1; string FromUserID = 1;
} }
message GetBlacklistResp{ message GetBlacklistResp{
server_api_params.CommonResp commonResp = 1; repeated server_api_params.PublicUserInfo BlackUserInfoList = 1;
repeated server_api_params.PublicUserInfo BlackUserInfoList = 2;
} }
message IsFriendReq{ message IsFriendReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message IsFriendResp{ message IsFriendResp{
server_api_params.CommonResp commonResp = 1; bool Response = 1;
bool Response = 2;
} }
message IsInBlackListReq{ message IsInBlackListReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message IsInBlackListResp{ message IsInBlackListResp{
server_api_params.CommonResp commonResp = 1; bool Response = 1;
bool Response = 2;
} }
message DeleteFriendReq{ message DeleteFriendReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message DeleteFriendResp{ message DeleteFriendResp{
server_api_params.CommonResp commonResp = 1;
} }
//process //process
message AddFriendResponseReq{ message AddFriendResponseReq{
CommID CommID = 1; string ToUserID = 1;
int32 handleResult = 2; string FromUserID = 2;
string handleMsg = 3; int32 handleResult = 3;
string handleMsg = 4;
} }
message AddFriendResponseResp{ message AddFriendResponseResp{
server_api_params.CommonResp commonResp = 1;
} }
message SetFriendRemarkReq{ message SetFriendRemarkReq{
CommID CommID = 1; string ToUserID = 1;
string Remark = 2; string FromUserID = 2;
string Remark = 3;
} }
message SetFriendRemarkResp{ message SetFriendRemarkResp{
server_api_params.CommonResp commonResp = 1;
} }
message GetSelfApplyListReq{ message GetSelfApplyListReq{
CommID CommID = 1; string ToUserID = 1;
string FromUserID = 2;
} }
message GetSelfApplyListResp{ message GetSelfApplyListResp{
server_api_params.CommonResp commonResp = 1; repeated server_api_params.FriendRequest FriendRequestList = 1;
repeated server_api_params.FriendRequest FriendRequestList = 2;
} }
service friend{ service friend{
// rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp);
rpc addFriend(AddFriendReq) returns(AddFriendResp); rpc addFriend(AddFriendReq) returns(AddFriendResp);
rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp); rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp);
rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp); rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp);
@ -153,7 +142,4 @@ service friend{
rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp);
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp); rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
rpc importFriend(ImportFriendReq) returns(ImportFriendResp); rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
// rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
// rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
} }

View File

@ -25,66 +25,21 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type GroupAddMemberInfo struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
RoleLevel int32 `protobuf:"varint,2,opt,name=roleLevel" json:"roleLevel,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} }
func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) }
func (*GroupAddMemberInfo) ProtoMessage() {}
func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{0}
}
func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b)
}
func (m *GroupAddMemberInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GroupAddMemberInfo.Marshal(b, m, deterministic)
}
func (dst *GroupAddMemberInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_GroupAddMemberInfo.Merge(dst, src)
}
func (m *GroupAddMemberInfo) XXX_Size() int {
return xxx_messageInfo_GroupAddMemberInfo.Size(m)
}
func (m *GroupAddMemberInfo) XXX_DiscardUnknown() {
xxx_messageInfo_GroupAddMemberInfo.DiscardUnknown(m)
}
var xxx_messageInfo_GroupAddMemberInfo proto.InternalMessageInfo
func (m *GroupAddMemberInfo) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
func (m *GroupAddMemberInfo) GetRoleLevel() int32 {
if m != nil {
return m.RoleLevel
}
return 0
}
type CreateGroupReq struct { type CreateGroupReq struct {
InitMemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=initMemberList" json:"initMemberList,omitempty"` InitMemberList []string `protobuf:"bytes,1,rep,name=initMemberList" json:"initMemberList,omitempty"`
GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"`
OwnerUserID string `protobuf:"bytes,5,opt,name=ownerUserID" json:"ownerUserID,omitempty"` AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs" json:"adminUserIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` OwnerUserID string `protobuf:"bytes,5,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) ProtoMessage() {}
func (*CreateGroupReq) Descriptor() ([]byte, []int) { func (*CreateGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{1} return fileDescriptor_group_4fa7763fd681832d, []int{0}
} }
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
@ -104,7 +59,7 @@ func (m *CreateGroupReq) XXX_DiscardUnknown() {
var xxx_messageInfo_CreateGroupReq proto.InternalMessageInfo var xxx_messageInfo_CreateGroupReq proto.InternalMessageInfo
func (m *CreateGroupReq) GetInitMemberList() []*GroupAddMemberInfo { func (m *CreateGroupReq) GetInitMemberList() []string {
if m != nil { if m != nil {
return m.InitMemberList return m.InitMemberList
} }
@ -118,6 +73,13 @@ func (m *CreateGroupReq) GetGroupInfo() *sdk_ws.GroupInfo {
return nil return nil
} }
func (m *CreateGroupReq) GetAdminUserIDs() []string {
if m != nil {
return m.AdminUserIDs
}
return nil
}
func (m *CreateGroupReq) GetOwnerUserID() string { func (m *CreateGroupReq) GetOwnerUserID() string {
if m != nil { if m != nil {
return m.OwnerUserID return m.OwnerUserID
@ -136,7 +98,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) ProtoMessage() {}
func (*CreateGroupResp) Descriptor() ([]byte, []int) { func (*CreateGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{2} return fileDescriptor_group_4fa7763fd681832d, []int{1}
} }
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
@ -174,7 +136,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) ProtoMessage() {}
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{3} return fileDescriptor_group_4fa7763fd681832d, []int{2}
} }
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
@ -212,7 +174,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) ProtoMessage() {}
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{4} return fileDescriptor_group_4fa7763fd681832d, []int{3}
} }
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
@ -250,7 +212,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) ProtoMessage() {}
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{5} return fileDescriptor_group_4fa7763fd681832d, []int{4}
} }
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
@ -287,7 +249,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} }
func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) ProtoMessage() {}
func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { func (*SetGroupInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{6} return fileDescriptor_group_4fa7763fd681832d, []int{5}
} }
func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b)
@ -319,7 +281,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) ProtoMessage() {}
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{7} return fileDescriptor_group_4fa7763fd681832d, []int{6}
} }
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
@ -365,7 +327,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) ProtoMessage() {}
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{8} return fileDescriptor_group_4fa7763fd681832d, []int{7}
} }
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
@ -411,7 +373,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat
func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) } func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListReq) ProtoMessage() {} func (*GetUserReqApplicationListReq) ProtoMessage() {}
func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{9} return fileDescriptor_group_4fa7763fd681832d, []int{8}
} }
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error { func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b) return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
@ -457,7 +419,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica
func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) } func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListResp) ProtoMessage() {} func (*GetUserReqApplicationListResp) ProtoMessage() {}
func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{10} return fileDescriptor_group_4fa7763fd681832d, []int{9}
} }
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error { func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b) return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
@ -504,7 +466,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) ProtoMessage() {}
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{11} return fileDescriptor_group_4fa7763fd681832d, []int{10}
} }
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
@ -555,7 +517,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) ProtoMessage() {}
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{12} return fileDescriptor_group_4fa7763fd681832d, []int{11}
} }
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
@ -589,7 +551,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) ProtoMessage() {}
func (*JoinGroupReq) Descriptor() ([]byte, []int) { func (*JoinGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{13} return fileDescriptor_group_4fa7763fd681832d, []int{12}
} }
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
@ -647,7 +609,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} }
func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) }
func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) ProtoMessage() {}
func (*JoinGroupResp) Descriptor() ([]byte, []int) { func (*JoinGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{14} return fileDescriptor_group_4fa7763fd681832d, []int{13}
} }
func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b)
@ -681,7 +643,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) ProtoMessage() {}
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{15} return fileDescriptor_group_4fa7763fd681832d, []int{14}
} }
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
@ -739,7 +701,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) ProtoMessage() {}
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{16} return fileDescriptor_group_4fa7763fd681832d, []int{15}
} }
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
@ -770,7 +732,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) ProtoMessage() {}
func (*QuitGroupReq) Descriptor() ([]byte, []int) { func (*QuitGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{17} return fileDescriptor_group_4fa7763fd681832d, []int{16}
} }
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
@ -807,7 +769,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} }
func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) }
func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) ProtoMessage() {}
func (*QuitGroupResp) Descriptor() ([]byte, []int) { func (*QuitGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{18} return fileDescriptor_group_4fa7763fd681832d, []int{17}
} }
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
@ -840,7 +802,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) ProtoMessage() {}
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{19} return fileDescriptor_group_4fa7763fd681832d, []int{18}
} }
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
@ -893,7 +855,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) ProtoMessage() {}
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{20} return fileDescriptor_group_4fa7763fd681832d, []int{19}
} }
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
@ -939,7 +901,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) ProtoMessage() {}
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{21} return fileDescriptor_group_4fa7763fd681832d, []int{20}
} }
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
@ -984,7 +946,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) ProtoMessage() {}
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{22} return fileDescriptor_group_4fa7763fd681832d, []int{21}
} }
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
@ -1024,7 +986,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) ProtoMessage() {}
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{23} return fileDescriptor_group_4fa7763fd681832d, []int{22}
} }
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
@ -1077,7 +1039,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} }
func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (m *Id2Result) String() string { return proto.CompactTextString(m) }
func (*Id2Result) ProtoMessage() {} func (*Id2Result) ProtoMessage() {}
func (*Id2Result) Descriptor() ([]byte, []int) { func (*Id2Result) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{24} return fileDescriptor_group_4fa7763fd681832d, []int{23}
} }
func (m *Id2Result) XXX_Unmarshal(b []byte) error { func (m *Id2Result) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Id2Result.Unmarshal(m, b) return xxx_messageInfo_Id2Result.Unmarshal(m, b)
@ -1122,7 +1084,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) ProtoMessage() {}
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{25} return fileDescriptor_group_4fa7763fd681832d, []int{24}
} }
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
@ -1161,7 +1123,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) ProtoMessage() {}
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{26} return fileDescriptor_group_4fa7763fd681832d, []int{25}
} }
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
@ -1207,7 +1169,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) ProtoMessage() {}
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{27} return fileDescriptor_group_4fa7763fd681832d, []int{26}
} }
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
@ -1254,7 +1216,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) ProtoMessage() {}
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{28} return fileDescriptor_group_4fa7763fd681832d, []int{27}
} }
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
@ -1306,7 +1268,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) ProtoMessage() {}
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{29} return fileDescriptor_group_4fa7763fd681832d, []int{28}
} }
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
@ -1346,7 +1308,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) ProtoMessage() {}
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{30} return fileDescriptor_group_4fa7763fd681832d, []int{29}
} }
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
@ -1398,7 +1360,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) ProtoMessage() {}
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{31} return fileDescriptor_group_4fa7763fd681832d, []int{30}
} }
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
@ -1438,7 +1400,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} }
func (m *CMSGroup) String() string { return proto.CompactTextString(m) } func (m *CMSGroup) String() string { return proto.CompactTextString(m) }
func (*CMSGroup) ProtoMessage() {} func (*CMSGroup) ProtoMessage() {}
func (*CMSGroup) Descriptor() ([]byte, []int) { func (*CMSGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{32} return fileDescriptor_group_4fa7763fd681832d, []int{31}
} }
func (m *CMSGroup) XXX_Unmarshal(b []byte) error { func (m *CMSGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CMSGroup.Unmarshal(m, b) return xxx_messageInfo_CMSGroup.Unmarshal(m, b)
@ -1492,7 +1454,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} }
func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsReq) ProtoMessage() {} func (*GetGroupsReq) ProtoMessage() {}
func (*GetGroupsReq) Descriptor() ([]byte, []int) { func (*GetGroupsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{33} return fileDescriptor_group_4fa7763fd681832d, []int{32}
} }
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
@ -1545,7 +1507,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} }
func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsResp) ProtoMessage() {} func (*GetGroupsResp) ProtoMessage() {}
func (*GetGroupsResp) Descriptor() ([]byte, []int) { func (*GetGroupsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{34} return fileDescriptor_group_4fa7763fd681832d, []int{33}
} }
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
@ -1590,7 +1552,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} }
func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberReq) ProtoMessage() {} func (*GetGroupMemberReq) ProtoMessage() {}
func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { func (*GetGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{35} return fileDescriptor_group_4fa7763fd681832d, []int{34}
} }
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
@ -1630,7 +1592,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} }
func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSReq) ProtoMessage() {} func (*GetGroupMembersCMSReq) ProtoMessage() {}
func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{36} return fileDescriptor_group_4fa7763fd681832d, []int{35}
} }
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
@ -1684,7 +1646,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{}
func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSResp) ProtoMessage() {} func (*GetGroupMembersCMSResp) ProtoMessage() {}
func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{37} return fileDescriptor_group_4fa7763fd681832d, []int{36}
} }
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
@ -1736,7 +1698,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} }
func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) } func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) }
func (*DismissGroupReq) ProtoMessage() {} func (*DismissGroupReq) ProtoMessage() {}
func (*DismissGroupReq) Descriptor() ([]byte, []int) { func (*DismissGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{38} return fileDescriptor_group_4fa7763fd681832d, []int{37}
} }
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error { func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b) return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
@ -1773,7 +1735,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} }
func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) } func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) }
func (*DismissGroupResp) ProtoMessage() {} func (*DismissGroupResp) ProtoMessage() {}
func (*DismissGroupResp) Descriptor() ([]byte, []int) { func (*DismissGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{39} return fileDescriptor_group_4fa7763fd681832d, []int{38}
} }
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error { func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b) return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
@ -1806,7 +1768,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} }
func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberReq) ProtoMessage() {} func (*MuteGroupMemberReq) ProtoMessage() {}
func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{40} return fileDescriptor_group_4fa7763fd681832d, []int{39}
} }
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error { func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b) return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
@ -1857,7 +1819,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} }
func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberResp) ProtoMessage() {} func (*MuteGroupMemberResp) ProtoMessage() {}
func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{41} return fileDescriptor_group_4fa7763fd681832d, []int{40}
} }
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error { func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b) return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
@ -1889,7 +1851,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR
func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberReq) ProtoMessage() {} func (*CancelMuteGroupMemberReq) ProtoMessage() {}
func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{42} return fileDescriptor_group_4fa7763fd681832d, []int{41}
} }
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error { func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b) return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
@ -1933,7 +1895,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember
func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberResp) ProtoMessage() {} func (*CancelMuteGroupMemberResp) ProtoMessage() {}
func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{43} return fileDescriptor_group_4fa7763fd681832d, []int{42}
} }
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error { func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b) return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
@ -1964,7 +1926,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} }
func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) } func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupReq) ProtoMessage() {} func (*MuteGroupReq) ProtoMessage() {}
func (*MuteGroupReq) Descriptor() ([]byte, []int) { func (*MuteGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{44} return fileDescriptor_group_4fa7763fd681832d, []int{43}
} }
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error { func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b) return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
@ -2001,7 +1963,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} }
func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) } func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupResp) ProtoMessage() {} func (*MuteGroupResp) ProtoMessage() {}
func (*MuteGroupResp) Descriptor() ([]byte, []int) { func (*MuteGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{45} return fileDescriptor_group_4fa7763fd681832d, []int{44}
} }
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error { func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b) return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
@ -2032,7 +1994,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} }
func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) } func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupReq) ProtoMessage() {} func (*CancelMuteGroupReq) ProtoMessage() {}
func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{46} return fileDescriptor_group_4fa7763fd681832d, []int{45}
} }
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error { func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b) return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
@ -2069,7 +2031,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} }
func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) } func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupResp) ProtoMessage() {} func (*CancelMuteGroupResp) ProtoMessage() {}
func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{47} return fileDescriptor_group_4fa7763fd681832d, []int{46}
} }
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error { func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b) return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
@ -2102,7 +2064,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam
func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) } func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberNicknameReq) ProtoMessage() {} func (*SetGroupMemberNicknameReq) ProtoMessage() {}
func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) { func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{48} return fileDescriptor_group_4fa7763fd681832d, []int{47}
} }
func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error { func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b) return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b)
@ -2153,7 +2115,7 @@ func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNickna
func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) } func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberNicknameResp) ProtoMessage() {} func (*SetGroupMemberNicknameResp) ProtoMessage() {}
func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) { func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{49} return fileDescriptor_group_4fa7763fd681832d, []int{48}
} }
func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error { func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b) return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b)
@ -2185,7 +2147,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL
func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) } func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListReq) ProtoMessage() {} func (*GetJoinedSuperGroupListReq) ProtoMessage() {}
func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{50} return fileDescriptor_group_4fa7763fd681832d, []int{49}
} }
func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error { func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b) return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b)
@ -2231,7 +2193,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup
func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) } func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListResp) ProtoMessage() {} func (*GetJoinedSuperGroupListResp) ProtoMessage() {}
func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{51} return fileDescriptor_group_4fa7763fd681832d, []int{50}
} }
func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error { func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b) return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b)
@ -2276,7 +2238,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} }
func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoReq) ProtoMessage() {} func (*GetSuperGroupsInfoReq) ProtoMessage() {}
func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{52} return fileDescriptor_group_4fa7763fd681832d, []int{51}
} }
func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error { func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b) return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b)
@ -2314,7 +2276,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{}
func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoResp) ProtoMessage() {} func (*GetSuperGroupsInfoResp) ProtoMessage() {}
func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{53} return fileDescriptor_group_4fa7763fd681832d, []int{52}
} }
func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error { func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b) return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b)
@ -2357,7 +2319,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} }
func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) } func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoReq) ProtoMessage() {} func (*SetGroupMemberInfoReq) ProtoMessage() {}
func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{54} return fileDescriptor_group_4fa7763fd681832d, []int{53}
} }
func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error { func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b) return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b)
@ -2429,7 +2391,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{}
func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) } func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoResp) ProtoMessage() {} func (*SetGroupMemberInfoResp) ProtoMessage() {}
func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{55} return fileDescriptor_group_4fa7763fd681832d, []int{54}
} }
func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error { func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b) return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b)
@ -2460,7 +2422,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq
func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) } func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupAbstractInfoReq) ProtoMessage() {} func (*GetGroupAbstractInfoReq) ProtoMessage() {}
func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{56} return fileDescriptor_group_4fa7763fd681832d, []int{55}
} }
func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error { func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b) return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b)
@ -2500,7 +2462,7 @@ func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} }
func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) } func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) }
func (*GroupAbstractInfo) ProtoMessage() {} func (*GroupAbstractInfo) ProtoMessage() {}
func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { func (*GroupAbstractInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{57} return fileDescriptor_group_4fa7763fd681832d, []int{56}
} }
func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error { func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b) return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b)
@ -2552,7 +2514,7 @@ func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoRe
func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) } func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupAbstractInfoResp) ProtoMessage() {} func (*GetGroupAbstractInfoResp) ProtoMessage() {}
func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_908b1d0f9beeddfc, []int{58} return fileDescriptor_group_4fa7763fd681832d, []int{57}
} }
func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error { func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b) return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b)
@ -2580,7 +2542,6 @@ func (m *GetGroupAbstractInfoResp) GetGroupAbstractInfos() []*GroupAbstractInfo
} }
func init() { func init() {
proto.RegisterType((*GroupAddMemberInfo)(nil), "group.GroupAddMemberInfo")
proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq") proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq")
proto.RegisterType((*CreateGroupResp)(nil), "group.CreateGroupResp") proto.RegisterType((*CreateGroupResp)(nil), "group.CreateGroupResp")
proto.RegisterType((*GetGroupsInfoReq)(nil), "group.GetGroupsInfoReq") proto.RegisterType((*GetGroupsInfoReq)(nil), "group.GetGroupsInfoReq")
@ -3586,129 +3547,128 @@ var _Group_serviceDesc = grpc.ServiceDesc{
Metadata: "group/group.proto", Metadata: "group/group.proto",
} }
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_908b1d0f9beeddfc) } func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_4fa7763fd681832d) }
var fileDescriptor_group_908b1d0f9beeddfc = []byte{ var fileDescriptor_group_4fa7763fd681832d = []byte{
// 1925 bytes of a gzipped FileDescriptorProto // 1907 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x73, 0x1b, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x73, 0xdb, 0xc6,
0x11, 0xaf, 0x95, 0x23, 0xc7, 0x6e, 0xdb, 0xb1, 0x33, 0x8e, 0x1c, 0x65, 0xa3, 0x24, 0xbe, 0xb9, 0x11, 0x1f, 0x50, 0xa6, 0x2c, 0xad, 0xa5, 0x50, 0x3e, 0x99, 0x32, 0x0d, 0xcb, 0xb6, 0x72, 0x71,
0x70, 0xb8, 0x20, 0xb1, 0x29, 0x1f, 0x5c, 0x71, 0x1c, 0x55, 0x47, 0x2e, 0x21, 0x39, 0xdf, 0x59, 0x53, 0x4d, 0x6b, 0x53, 0x1d, 0xa5, 0xcd, 0x34, 0x4d, 0x67, 0xd2, 0xc4, 0xae, 0x1d, 0x35, 0xa2,
0x36, 0x59, 0xe5, 0xb8, 0xaa, 0x2b, 0xc0, 0xac, 0xa5, 0xd1, 0xde, 0xc6, 0xd2, 0xee, 0x78, 0x67, 0x54, 0x83, 0x4e, 0x33, 0x93, 0x69, 0xab, 0x42, 0xe4, 0x11, 0x81, 0x45, 0x02, 0x27, 0x1c, 0x20,
0xd7, 0xb9, 0xa2, 0xa0, 0x0a, 0x78, 0xe0, 0x89, 0x3f, 0x0f, 0x3c, 0xf2, 0x46, 0xf1, 0x05, 0xf8, 0x67, 0x3a, 0xed, 0x4c, 0xd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-5,14 +5,11 @@ option go_package = "Open_IM/pkg/proto/group;group";
package group; package group;
message GroupAddMemberInfo{
string userID = 1;
int32 roleLevel = 2;
}
message CreateGroupReq{ message CreateGroupReq{
repeated GroupAddMemberInfo initMemberList = 1; repeated string initMemberList = 1;
server_api_params.GroupInfo groupInfo = 2; server_api_params.GroupInfo groupInfo = 2;
repeated string adminUserIDs = 3;
string ownerUserID = 5; //owner string ownerUserID = 5; //owner
} }
message CreateGroupResp{ message CreateGroupResp{

View File

@ -132,3 +132,7 @@ func IsRepeatStringSlice(arr []string) bool {
} }
return false return false
} }
func IsRepeatID(args ...interface{}) bool {
return false
}