diff --git a/cmd/open_im_api/docs/docs.go b/cmd/open_im_api/docs/docs.go
index 183ab0bf4..db9817fad 100644
--- a/cmd/open_im_api/docs/docs.go
+++ b/cmd/open_im_api/docs/docs.go
@@ -155,13 +155,6 @@ const docTemplate = `{
"summary": "用户注册",
"operationId": "UserRegister",
"parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
{
"description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
"name": "req",
@@ -209,13 +202,6 @@ const docTemplate = `{
"summary": "用户登录",
"operationId": "UserToken",
"parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
{
"description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
"name": "req",
@@ -4596,7 +4582,6 @@ const docTemplate = `{
"Open_IM_internal_api_manage.OANotificationElem": {
"type": "object",
"required": [
- "notificationFaceURL",
"notificationName",
"notificationType",
"text"
@@ -5946,13 +5931,21 @@ const docTemplate = `{
"base_info.GetGroupAllMemberReq": {
"type": "object",
"required": [
+ "count",
"groupID",
+ "offset",
"operationID"
],
"properties": {
+ "count": {
+ "type": "integer"
+ },
"groupID": {
"type": "string"
},
+ "offset": {
+ "type": "integer"
+ },
"operationID": {
"type": "string"
}
@@ -6521,7 +6514,11 @@ const docTemplate = `{
],
"properties": {
"roleLevel": {
- "type": "integer"
+ "type": "integer",
+ "enum": [
+ 1,
+ 3
+ ]
},
"userID": {
"type": "string"
@@ -6652,6 +6649,12 @@ const docTemplate = `{
"groupID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
+ "joinSource": {
+ "type": "integer"
+ },
"operationID": {
"type": "string"
},
@@ -6751,6 +6754,9 @@ const docTemplate = `{
"sessionType"
],
"properties": {
+ "businessOperationID": {
+ "type": "string"
+ },
"contentType": {
"type": "integer"
},
@@ -6760,6 +6766,9 @@ const docTemplate = `{
"isOnlineOnly": {
"type": "boolean"
},
+ "notOfflinePush": {
+ "type": "boolean"
+ },
"offlinePushInfo": {
"$ref": "#/definitions/server_api_params.OfflinePushInfo"
},
@@ -6798,6 +6807,9 @@ const docTemplate = `{
"sessionType"
],
"properties": {
+ "businessOperationID": {
+ "type": "string"
+ },
"contentType": {
"type": "integer"
},
@@ -6807,6 +6819,9 @@ const docTemplate = `{
"isOnlineOnly": {
"type": "boolean"
},
+ "notOfflinePush": {
+ "type": "boolean"
+ },
"offlinePushInfo": {
"$ref": "#/definitions/server_api_params.OfflinePushInfo"
},
@@ -7063,7 +7078,6 @@ const docTemplate = `{
"required": [
"fromUserID",
"operationID",
- "remark",
"toUserID"
],
"properties": {
@@ -7129,6 +7143,9 @@ const docTemplate = `{
"operationID"
],
"properties": {
+ "applyMemberFriend": {
+ "type": "integer"
+ },
"ex": {
"type": "string"
},
@@ -7144,6 +7161,9 @@ const docTemplate = `{
"introduction": {
"type": "string"
},
+ "lookMemberInfo": {
+ "type": "integer"
+ },
"needVerification": {
"type": "integer"
},
@@ -7747,7 +7767,6 @@ const docTemplate = `{
"internal_api_manage.OANotificationElem": {
"type": "object",
"required": [
- "notificationFaceURL",
"notificationName",
"notificationType",
"text"
@@ -8231,6 +8250,9 @@ const docTemplate = `{
"server_api_params.GroupInfo": {
"type": "object",
"properties": {
+ "applyMemberFriend": {
+ "type": "integer"
+ },
"createTime": {
"type": "integer"
},
@@ -8255,6 +8277,9 @@ const docTemplate = `{
"introduction": {
"type": "string"
},
+ "lookMemberInfo": {
+ "type": "integer"
+ },
"memberCount": {
"type": "integer"
},
@@ -8264,6 +8289,12 @@ const docTemplate = `{
"notification": {
"type": "string"
},
+ "notificationUpdateTime": {
+ "type": "integer"
+ },
+ "notificationUserID": {
+ "type": "string"
+ },
"ownerUserID": {
"type": "string"
},
@@ -8287,6 +8318,9 @@ const docTemplate = `{
"groupID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
"joinSource": {
"type": "integer"
},
@@ -8331,6 +8365,12 @@ const docTemplate = `{
"handleUserID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
+ "joinSource": {
+ "type": "integer"
+ },
"reqMsg": {
"type": "string"
},
diff --git a/cmd/open_im_api/docs/swagger.json b/cmd/open_im_api/docs/swagger.json
index d93a390f8..e367d21cf 100644
--- a/cmd/open_im_api/docs/swagger.json
+++ b/cmd/open_im_api/docs/swagger.json
@@ -147,13 +147,6 @@
"summary": "用户注册",
"operationId": "UserRegister",
"parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
{
"description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
"name": "req",
@@ -201,13 +194,6 @@
"summary": "用户登录",
"operationId": "UserToken",
"parameters": [
- {
- "type": "string",
- "description": "im token",
- "name": "token",
- "in": "header",
- "required": true
- },
{
"description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
"name": "req",
@@ -4588,7 +4574,6 @@
"Open_IM_internal_api_manage.OANotificationElem": {
"type": "object",
"required": [
- "notificationFaceURL",
"notificationName",
"notificationType",
"text"
@@ -5938,13 +5923,21 @@
"base_info.GetGroupAllMemberReq": {
"type": "object",
"required": [
+ "count",
"groupID",
+ "offset",
"operationID"
],
"properties": {
+ "count": {
+ "type": "integer"
+ },
"groupID": {
"type": "string"
},
+ "offset": {
+ "type": "integer"
+ },
"operationID": {
"type": "string"
}
@@ -6513,7 +6506,11 @@
],
"properties": {
"roleLevel": {
- "type": "integer"
+ "type": "integer",
+ "enum": [
+ 1,
+ 3
+ ]
},
"userID": {
"type": "string"
@@ -6644,6 +6641,12 @@
"groupID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
+ "joinSource": {
+ "type": "integer"
+ },
"operationID": {
"type": "string"
},
@@ -6743,6 +6746,9 @@
"sessionType"
],
"properties": {
+ "businessOperationID": {
+ "type": "string"
+ },
"contentType": {
"type": "integer"
},
@@ -6752,6 +6758,9 @@
"isOnlineOnly": {
"type": "boolean"
},
+ "notOfflinePush": {
+ "type": "boolean"
+ },
"offlinePushInfo": {
"$ref": "#/definitions/server_api_params.OfflinePushInfo"
},
@@ -6790,6 +6799,9 @@
"sessionType"
],
"properties": {
+ "businessOperationID": {
+ "type": "string"
+ },
"contentType": {
"type": "integer"
},
@@ -6799,6 +6811,9 @@
"isOnlineOnly": {
"type": "boolean"
},
+ "notOfflinePush": {
+ "type": "boolean"
+ },
"offlinePushInfo": {
"$ref": "#/definitions/server_api_params.OfflinePushInfo"
},
@@ -7055,7 +7070,6 @@
"required": [
"fromUserID",
"operationID",
- "remark",
"toUserID"
],
"properties": {
@@ -7121,6 +7135,9 @@
"operationID"
],
"properties": {
+ "applyMemberFriend": {
+ "type": "integer"
+ },
"ex": {
"type": "string"
},
@@ -7136,6 +7153,9 @@
"introduction": {
"type": "string"
},
+ "lookMemberInfo": {
+ "type": "integer"
+ },
"needVerification": {
"type": "integer"
},
@@ -7739,7 +7759,6 @@
"internal_api_manage.OANotificationElem": {
"type": "object",
"required": [
- "notificationFaceURL",
"notificationName",
"notificationType",
"text"
@@ -8223,6 +8242,9 @@
"server_api_params.GroupInfo": {
"type": "object",
"properties": {
+ "applyMemberFriend": {
+ "type": "integer"
+ },
"createTime": {
"type": "integer"
},
@@ -8247,6 +8269,9 @@
"introduction": {
"type": "string"
},
+ "lookMemberInfo": {
+ "type": "integer"
+ },
"memberCount": {
"type": "integer"
},
@@ -8256,6 +8281,12 @@
"notification": {
"type": "string"
},
+ "notificationUpdateTime": {
+ "type": "integer"
+ },
+ "notificationUserID": {
+ "type": "string"
+ },
"ownerUserID": {
"type": "string"
},
@@ -8279,6 +8310,9 @@
"groupID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
"joinSource": {
"type": "integer"
},
@@ -8323,6 +8357,12 @@
"handleUserID": {
"type": "string"
},
+ "inviterUserID": {
+ "type": "string"
+ },
+ "joinSource": {
+ "type": "integer"
+ },
"reqMsg": {
"type": "string"
},
diff --git a/cmd/open_im_api/docs/swagger.yaml b/cmd/open_im_api/docs/swagger.yaml
index 08b433cd2..77f32fd30 100644
--- a/cmd/open_im_api/docs/swagger.yaml
+++ b/cmd/open_im_api/docs/swagger.yaml
@@ -38,7 +38,6 @@ definitions:
videoElem:
$ref: '#/definitions/Open_IM_internal_api_manage.VideoElem'
required:
- - notificationFaceURL
- notificationName
- notificationType
- text
@@ -910,12 +909,18 @@ definitions:
type: object
base_info.GetGroupAllMemberReq:
properties:
+ count:
+ type: integer
groupID:
type: string
+ offset:
+ type: integer
operationID:
type: string
required:
+ - count
- groupID
+ - offset
- operationID
type: object
base_info.GetGroupAllMemberResp:
@@ -1285,6 +1290,9 @@ definitions:
base_info.GroupAddMemberInfo:
properties:
roleLevel:
+ enum:
+ - 1
+ - 3
type: integer
userID:
type: string
@@ -1372,6 +1380,10 @@ definitions:
properties:
groupID:
type: string
+ inviterUserID:
+ type: string
+ joinSource:
+ type: integer
operationID:
type: string
reqMessage:
@@ -1436,12 +1448,16 @@ definitions:
type: object
base_info.ManagementBatchSendMsgReq:
properties:
+ businessOperationID:
+ type: string
contentType:
type: integer
groupID:
type: string
isOnlineOnly:
type: boolean
+ notOfflinePush:
+ type: boolean
offlinePushInfo:
$ref: '#/definitions/server_api_params.OfflinePushInfo'
operationID:
@@ -1468,12 +1484,16 @@ definitions:
type: object
base_info.ManagementSendMsgReq:
properties:
+ businessOperationID:
+ type: string
contentType:
type: integer
groupID:
type: string
isOnlineOnly:
type: boolean
+ notOfflinePush:
+ type: boolean
offlinePushInfo:
$ref: '#/definitions/server_api_params.OfflinePushInfo'
operationID:
@@ -1657,7 +1677,6 @@ definitions:
required:
- fromUserID
- operationID
- - remark
- toUserID
type: object
base_info.SetFriendRemarkResp:
@@ -1689,6 +1708,8 @@ definitions:
type: object
base_info.SetGroupInfoReq:
properties:
+ applyMemberFriend:
+ type: integer
ex:
type: string
faceURL:
@@ -1699,6 +1720,8 @@ definitions:
type: string
introduction:
type: string
+ lookMemberInfo:
+ type: integer
needVerification:
type: integer
notification:
@@ -2134,7 +2157,6 @@ definitions:
videoElem:
$ref: '#/definitions/internal_api_manage.VideoElem'
required:
- - notificationFaceURL
- notificationName
- notificationType
- text
@@ -2428,6 +2450,8 @@ definitions:
type: object
server_api_params.GroupInfo:
properties:
+ applyMemberFriend:
+ type: integer
createTime:
type: integer
creatorUserID:
@@ -2444,12 +2468,18 @@ definitions:
type: integer
introduction:
type: string
+ lookMemberInfo:
+ type: integer
memberCount:
type: integer
needVerification:
type: integer
notification:
type: string
+ notificationUpdateTime:
+ type: integer
+ notificationUserID:
+ type: string
ownerUserID:
type: string
status:
@@ -2465,6 +2495,8 @@ definitions:
type: string
groupID:
type: string
+ inviterUserID:
+ type: string
joinSource:
type: integer
joinTime:
@@ -2494,6 +2526,10 @@ definitions:
type: integer
handleUserID:
type: string
+ inviterUserID:
+ type: string
+ joinSource:
+ type: integer
reqMsg:
type: string
reqTime:
@@ -2702,11 +2738,6 @@ paths:
description: 用户注册
operationId: UserRegister
parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
ex为拓展字段
gender为性别, 0为女, 1为男
in: body
@@ -2739,11 +2770,6 @@ paths:
description: 获取用户的token
operationId: UserToken
parameters:
- - description: im token
- in: header
- name: token
- required: true
- type: string
- description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
in: body
name: req
diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go
index 66e2880b1..6b9b5894b 100644
--- a/cmd/open_im_api/main.go
+++ b/cmd/open_im_api/main.go
@@ -3,6 +3,7 @@ package main
import (
_ "Open_IM/cmd/open_im_api/docs"
apiAuth "Open_IM/internal/api/auth"
+ clientInit "Open_IM/internal/api/client_init"
"Open_IM/internal/api/conversation"
"Open_IM/internal/api/friend"
"Open_IM/internal/api/group"
@@ -43,7 +44,7 @@ func main() {
gin.SetMode(gin.ReleaseMode)
f, _ := os.Create("../logs/api.log")
gin.DefaultWriter = io.MultiWriter(f)
- gin.SetMode(gin.DebugMode)
+ // gin.SetMode(gin.DebugMode)
r := gin.Default()
r.Use(utils.CorsHandler())
@@ -108,6 +109,8 @@ func main() {
groupRouterGroup.POST("/cancel_mute_group", group.CancelMuteGroup)
groupRouterGroup.POST("/set_group_member_nickname", group.SetGroupMemberNickname)
groupRouterGroup.POST("/set_group_member_info", group.SetGroupMemberInfo)
+ groupRouterGroup.POST("/get_group_abstract_info", group.GetGroupAbstractInfo)
+ //groupRouterGroup.POST("/get_group_all_member_list_by_split", group.GetGroupAllMemberListBySplit)
}
superGroupRouterGroup := r.Group("/super_group")
{
@@ -204,6 +207,12 @@ func main() {
}
+ initGroup := r.Group("/init")
+ {
+ initGroup.POST("/set_client_config", clientInit.SetClientInitConfig)
+ initGroup.POST("/get_client_config", clientInit.GetClientInitConfig)
+ }
+
go apiThird.MinioInit()
defaultPorts := config.Config.Api.GinPort
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10002 as port")
diff --git a/cmd/open_im_cron_task/Makefile b/cmd/open_im_cron_task/Makefile
new file mode 100644
index 000000000..e14b3da77
--- /dev/null
+++ b/cmd/open_im_cron_task/Makefile
@@ -0,0 +1,23 @@
+.PHONY: all build run gotool install clean help
+
+BINARY_NAME=open_im_cron_task
+BIN_DIR=../../bin/
+
+all: gotool build
+
+build:
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
+
+run:
+ @go run ./
+
+gotool:
+ go fmt ./
+ go vet ./
+
+install:
+ make build
+ mv ${BINARY_NAME} ${BIN_DIR}
+
+clean:
+ @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
diff --git a/cmd/open_im_cron_task/main.go b/cmd/open_im_cron_task/main.go
new file mode 100644
index 000000000..1e7396d61
--- /dev/null
+++ b/cmd/open_im_cron_task/main.go
@@ -0,0 +1,11 @@
+package main
+
+import (
+ "Open_IM/internal/cron_task"
+ "fmt"
+)
+
+func main() {
+ fmt.Println("start cronTask")
+ cronTask.StartCronTask()
+}
diff --git a/cmd/open_im_demo/main.go b/cmd/open_im_demo/main.go
index b73fe7676..f0639fc6d 100644
--- a/cmd/open_im_demo/main.go
+++ b/cmd/open_im_demo/main.go
@@ -40,8 +40,22 @@ func main() {
demoRouterGroup.POST("/login", register.Login)
demoRouterGroup.POST("/reset_password", register.ResetPassword)
}
+ cmsRouterGroup := r.Group("/cms_admin")
+ {
+ cmsRouterGroup.POST("/generate_invitation_code", register.GenerateInvitationCode)
+ cmsRouterGroup.POST("/query_invitation_code", register.QueryInvitationCode)
+ cmsRouterGroup.POST("/get_invitation_codes", register.GetInvitationCodes)
+
+ cmsRouterGroup.POST("/query_user_ip_limit_login", register.QueryUserIDLimitLogin)
+ cmsRouterGroup.POST("/add_user_ip_limit_login", register.AddUserIPLimitLogin)
+ cmsRouterGroup.POST("/remove_user_ip_limit_login", register.RemoveUserIPLimitLogin)
+
+ cmsRouterGroup.POST("/query_ip_register", register.QueryIPRegister)
+ cmsRouterGroup.POST("/add_ip_limit", register.AddIPLimit)
+ cmsRouterGroup.POST("/remove_ip_Limit", register.RemoveIPLimit)
+ }
defaultPorts := config.Config.Demo.Port
- ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 42233 as port")
+ ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10004 as port")
flag.Parse()
fmt.Println("start demo api server, port: ", *ginPort)
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
@@ -51,6 +65,7 @@ func main() {
address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort)
fmt.Println("start demo api server address: ", address)
go register.OnboardingProcessRoutine()
+ go register.ImportFriendRoutine()
err := r.Run(address)
if err != nil {
log.Error("", "run failed ", *ginPort, err.Error())
diff --git a/config/config.yaml b/config/config.yaml
index 998a486c5..7236c9c32 100644
--- a/config/config.yaml
+++ b/config/config.yaml
@@ -17,8 +17,8 @@ mysql:
dbMysqlDatabaseName: openIM_v2 #默认即可
dbTableName: eMsg #默认即可
dbMsgTableNum: 1
- dbMaxOpenConns: 20
- dbMaxIdleConns: 10
+ dbMaxOpenConns: 200
+ dbMaxIdleConns: 100
dbMaxLifeTime: 120
mongo:
@@ -32,6 +32,7 @@ mongo:
dbPassword: #mongo密码,建议先不设置
dbMaxPoolSize: 100
dbRetainChatRecords: 3650 #mongo保存离线消息时间(天),根据需求修改
+ chatRecordsClearTime: "* * * * *" # 每天凌晨3点清除消息,该配置和linux定时任务一样, 清理操作建议设置在用户活跃少的时候 # 0 3 * * *
redis:
dbAddress: [ 127.0.0.1:16379 ] #redis地址 单机时,填写一个地址即可,使用redis集群时候,填写集群中多个节点地址(主从地址都可以填写,增加容灾能力),默认即可
@@ -46,9 +47,9 @@ kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
topic: "ws2ms_chat" #用于mongo和mysql保存消息
- ws2mschatoffline:
- addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
- topic: "ws2ms_chat_offline" #原为离线用户消息处理,目前暂时弃用
+# ws2mschatoffline:
+# addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
+# topic: "ws2ms_chat_offline" #原为离线用户消息处理,目前暂时弃用
msgtomongo:
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
topic: "msg_to_mongo"
@@ -63,7 +64,6 @@ kafka:
-
#---------------Internal service configuration---------------------#
# The service ip default is empty,
@@ -72,7 +72,7 @@ kafka:
#如果是单机模式,用0.0.0.0或者不填,默认即可
serverip: 0.0.0.0
-#作为rpc时,注册到etcd的地址,单机或内网集群调用默认为空即可(会默认注册本机ip),如果需要注册外网ip,需要修改(目的是api/gateway能访问到)
+#作为rpc时,注册到etcd的地址,单机默认即可,如果是集群部署,需要修改(具体使用内网地址还是外网地址,要依情况而定,目的是api/gateway能访问到)
rpcRegisterIP:
#默认即可
listenIP: 0.0.0.0
@@ -102,6 +102,9 @@ cmsapi:
sdk:
openImSdkWsPort: [ 10003 ] #jssdk服务端口,默认即可,项目中使用jssdk才需开放此端口或做nginx转发
dataDir: [ ../db/sdk/ ]
+ openImWsAddress: ws://127.0.0.1:10001
+ openImApiAddress: http://127.0.0.1:10002
+
#对象存储服务,以下配置二选一,目前支持两种,腾讯云和minio,二者配置好其中一种即可(如果使用minio参考https://doc.rentsoft.cn/#/qa/minio搭建minio服务器)
credential: #腾讯cos,发送图片、视频、文件时需要,请自行申请后替换,必须修改
tencent:
@@ -120,6 +123,7 @@ credential: #腾讯cos,发送图片、视频、文件时需要,请自行申
accessKeyID: user12345
secretAccessKey: key12345
storageTime: 50 #文件在minio中保存的时间
+ isDistributedMod: false # 是否分布式多硬盘部署 默认docker-compose中为false
ali: # ali oss
regionID: "oss-cn-beijing"
accessKeyID: ""
@@ -131,14 +135,15 @@ credential: #腾讯cos,发送图片、视频、文件时需要,请自行申
stsDurationSeconds: 3600
OssRoleArn: "acs:ram::xxx:role/xxx"
aws:
- accessKeyID: AKIASZQEZISVRBN4UEWJ #AssumeRole用户关联的accessKeyID
- accessKeySecret: eBS3RyCRD8yUa7I7EGPbxjyBlKtdzN5a6tDnY/wZ #AssumeRole用户关联的accessKeySecrect
- region: ap-southeast-1 #分区
- bucket: ouyang #桶
- finalHost: ouyang.s3.ap-southeast-1.amazonaws.com #对外Host
- roleArn: arn:aws:iam::192209831083:role/AWS_S3_FOR_OUYANG #RoleArn
- externalId: AssumeRoleExtend #角色扩展Id
- roleSessionName: Required-AWS-ID-OPENIM #角色SESSION名称
+ accessKeyID: 1 #AssumeRole用户关联的accessKeyID
+ accessKeySecret: 2 #AssumeRole用户关联的accessKeySecrect
+ region: ap-southeast-1 #分区
+ bucket: ouyang #桶
+ finalHost: ouyang.s3.ap-southeast-1.amazonaws.com #对外Host
+ roleArn: arn:aws:iam::192209831083:role/AWS_S3_FOR_OUYANG #RoleArn
+ externalId: AssumeRoleExtend #角色扩展Id
+ roleSessionName: Required-AWS-ID-OPENIM #角色SESSION名称
+
dtm:
serverURL: 127.0.0.1:10007
@@ -156,7 +161,8 @@ rpcport: #rpc服务端口 默认即可
openImOfficePort: [ 10210 ]
openImOrganizationPort: [ 10220 ]
openImConversationPort: [ 10230 ]
- openImCachePort: [10240]
+ openImCachePort: [ 10240 ]
+ openImRealTimeCommPort: [ 11300 ]
c2c:
callbackBeforeSendMsg:
switch: false
@@ -259,7 +265,7 @@ singleMessageHasReadReceiptEnable: true
tokenpolicy:
accessSecret: "open_im_server" #token生成相关,默认即可
# Token effective time day as a unit
- accessExpire: 3650 #token过期时间(天) 默认即可
+ accessExpire: 90 #token过期时间(天) 默认即可
messageverify:
friendVerify: false
@@ -306,6 +312,9 @@ callback:
callbackUserOffline:
enable: false
callbackTimeOut: 2
+ callbackUserKickOff:
+ enable: false
+ callbackTimeOut: 2
callbackOfflinePush:
enable: false
callbackTimeOut: 2
@@ -728,6 +737,7 @@ demo:
verificationCodeTemplateCode: 2902877
enable: true
superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
+ needInvitationCode: false
# second
codeTTL: 60
useSuperCode: true
@@ -739,6 +749,10 @@ demo:
smtpPort: 25 #需开放此端口 出口方向
testDepartMentID: 001
imAPIURL: http://127.0.0.1:10002
+ onboardProcess: false # 是否开启注册流程
+ joinDepartmentIDList: [] # 用户注册进来默认加的部门ID列表 不填就随机
+ joinDepartmentGroups: false # 注册是否加部门群
+ oaNotification: false # 注册是否发送OA通知
rtc:
signalTimeout: 35
diff --git a/go.mod b/go.mod
index 2b933bf4c..94d0db4d2 100644
--- a/go.mod
+++ b/go.mod
@@ -39,6 +39,7 @@ require (
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/pkg/errors v0.9.1
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
+ github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.2
github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe
@@ -47,6 +48,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.428
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.428
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca
+ github.com/xuri/excelize/v2 v2.6.0
go.etcd.io/etcd/api/v3 v3.5.4
go.etcd.io/etcd/client/v3 v3.5.4
go.mongodb.org/mongo-driver v1.8.3
@@ -54,7 +56,7 @@ require (
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
- golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
+ golang.org/x/image v0.0.0-20211028202545-6944b10bf410
golang.org/x/net v0.0.0-20220622184535-263ec571b305
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 // indirect
golang.org/x/tools v0.1.11 // indirect
diff --git a/go.sum b/go.sum
index 49fc3f000..00cee68d9 100644
--- a/go.sum
+++ b/go.sum
@@ -446,6 +446,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -504,8 +506,14 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
+github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
+github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9M9xC1o=
+github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
+github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
+github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
@@ -571,6 +579,12 @@ github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyh
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
github.com/xdg/scram v1.0.3/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
+github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 h1:3X7aE0iLKJ5j+tz58BpvIZkXNV7Yq4jC93Z/rbN2Fxk=
+github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
+github.com/xuri/excelize/v2 v2.6.0 h1:m/aXAzSAqxgt74Nfd+sNzpzVKhTGl7+S9nbG4A57mF4=
+github.com/xuri/excelize/v2 v2.6.0/go.mod h1:Q1YetlHesXEKwGFfeJn7PfEZz2IvHb6wdOeYjBxVcVs=
+github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
+github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -625,6 +639,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -639,8 +654,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk=
-golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
+golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -714,6 +729,7 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220622184535-263ec571b305 h1:dAgbJ2SP4jD6XYfMNLVj0BF21jo2PjChrtGaAvF5M3I=
golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go
index 9d713410b..f1a0551a6 100644
--- a/internal/api/auth/auth.go
+++ b/internal/api/auth/auth.go
@@ -3,6 +3,7 @@ package apiAuth
import (
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
+ "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
@@ -10,10 +11,11 @@ import (
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
- "github.com/fatih/structs"
- "github.com/gin-gonic/gin"
"net/http"
"strings"
+
+ "github.com/fatih/structs"
+ "github.com/gin-gonic/gin"
)
// @Summary 用户注册
@@ -47,9 +49,9 @@ func UserRegister(c *gin.Context) {
//copier.Copy(req.UserInfo, ¶ms)
req.OperationID = params.OperationID
log.NewInfo(req.OperationID, "UserRegister args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -65,11 +67,17 @@ func UserRegister(c *gin.Context) {
if reply.CommonResp.ErrCode != 0 {
errMsg := req.OperationID + " " + " UserRegister failed " + reply.CommonResp.ErrMsg + req.String()
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ if reply.CommonResp.ErrCode == constant.RegisterLimit {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
+ } else if reply.CommonResp.ErrCode == constant.InvitationError {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
+ } else {
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ }
return
}
- pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
+ pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID, LoginIp: params.CreateIp}
replyToken, err := client.UserToken(context.Background(), pbDataToken)
if err != nil {
errMsg := req.OperationID + " " + " client.UserToken failed " + err.Error() + pbDataToken.String()
@@ -110,11 +118,11 @@ func UserToken(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg})
return
}
- req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
+ req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID, LoginIp: params.LoginIp}
log.NewInfo(req.OperationID, "UserToken args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -206,9 +214,9 @@ func ForceLogout(c *gin.Context) {
}
log.NewInfo(req.OperationID, "ForceLogout args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/client_init/init_config.go b/internal/api/client_init/init_config.go
new file mode 100644
index 000000000..de08fc90c
--- /dev/null
+++ b/internal/api/client_init/init_config.go
@@ -0,0 +1,75 @@
+package clientInit
+
+import (
+ api "Open_IM/pkg/base_info"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ "Open_IM/pkg/common/log"
+ "Open_IM/pkg/common/token_verify"
+ "Open_IM/pkg/utils"
+ "net/http"
+
+ "github.com/gin-gonic/gin"
+ "github.com/jinzhu/gorm"
+)
+
+func SetClientInitConfig(c *gin.Context) {
+ var req api.SetClientInitConfigReq
+ var resp api.SetClientInitConfigResp
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
+ err, _ := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
+ if err != nil {
+ errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
+ log.NewError(req.OperationID, errMsg, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ m := make(map[string]interface{})
+ if req.DiscoverPageURL != nil {
+ m["discover_page_url"] = *req.DiscoverPageURL
+ }
+ if len(m) > 0 {
+ err := imdb.SetClientInitConfig(m)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
+ return
+ }
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
+ c.JSON(http.StatusOK, resp)
+}
+
+func GetClientInitConfig(c *gin.Context) {
+ var req api.GetClientInitConfigReq
+ var resp api.GetClientInitConfigResp
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
+ err, _ := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
+ if err != nil {
+ errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
+ log.NewError(req.OperationID, errMsg, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ config, err := imdb.GetClientInitConfig()
+ if err != nil {
+ if !gorm.IsRecordNotFoundError(err) {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
+ return
+ }
+ }
+ resp.Data.DiscoverPageURL = config.DiscoverPageURL
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp)
+ c.JSON(http.StatusOK, resp)
+
+}
diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go
index 2c26d4f0e..cfda0abb8 100644
--- a/internal/api/conversation/conversation.go
+++ b/internal/api/conversation/conversation.go
@@ -26,15 +26,15 @@ func SetConversation(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.Conversation = &pbUser.Conversation{}
+ reqPb.Conversation = &pbConversation.Conversation{}
err := utils.CopyStructFields(&reqPb, req)
err = utils.CopyStructFields(reqPb.Conversation, req.Conversation)
if err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -69,9 +69,9 @@ func ModifyConversationField(c *gin.Context) {
if err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -104,9 +104,9 @@ func BatchSetConversations(c *gin.Context) {
if err := utils.CopyStructFields(&reqPb, req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -154,9 +154,9 @@ func GetAllConversations(c *gin.Context) {
if err := utils.CopyStructFields(&reqPb, req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -204,9 +204,9 @@ func GetConversation(c *gin.Context) {
if err := utils.CopyStructFields(&reqPb, req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -254,9 +254,9 @@ func GetConversations(c *gin.Context) {
if err := utils.CopyStructFields(&reqPb, req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -292,9 +292,9 @@ func SetRecvMsgOpt(c *gin.Context) {
if err := utils.CopyStructFields(&reqPb, req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go
index ac637275f..2e896ea4e 100644
--- a/internal/api/friend/friend.go
+++ b/internal/api/friend/friend.go
@@ -48,7 +48,7 @@ func AddBlack(c *gin.Context) {
}
log.NewInfo(params.OperationID, "AddBlacklist args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
client := rpc.NewFriendClient(etcdConn)
RpcResp, err := client.AddBlacklist(context.Background(), req)
if err != nil {
@@ -93,9 +93,9 @@ func ImportFriend(c *gin.Context) {
}
log.NewInfo(req.OperationID, "ImportFriend args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -156,9 +156,9 @@ func AddFriend(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -213,9 +213,9 @@ func AddFriendResponse(c *gin.Context) {
utils.CopyStructFields(req, ¶ms)
log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -268,9 +268,9 @@ func DeleteFriend(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -322,9 +322,9 @@ func GetBlacklist(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -383,9 +383,9 @@ func SetFriendRemark(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -436,9 +436,9 @@ func RemoveBlack(c *gin.Context) {
}
log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -490,9 +490,9 @@ func IsFriend(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "IsFriend args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -545,9 +545,9 @@ func GetFriendList(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "GetFriendList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -601,9 +601,9 @@ func GetFriendApplyList(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -657,9 +657,9 @@ func GetSelfFriendApplyList(c *gin.Context) {
log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/group/group.go b/internal/api/group/group.go
index 9c7500872..bdb4edc69 100644
--- a/internal/api/group/group.go
+++ b/internal/api/group/group.go
@@ -12,6 +12,7 @@ import (
"Open_IM/pkg/utils"
"context"
"github.com/golang/protobuf/ptypes/wrappers"
+ "google.golang.org/grpc"
"github.com/gin-gonic/gin"
@@ -56,9 +57,9 @@ func KickGroupMember(c *gin.Context) {
log.NewInfo(req.OperationID, "KickGroupMember args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -119,9 +120,9 @@ func GetGroupMembersInfo(c *gin.Context) {
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -163,9 +164,9 @@ func GetGroupMemberList(c *gin.Context) {
log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -220,24 +221,25 @@ func GetGroupAllMemberList(c *gin.Context) {
log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
+ maxSizeOption := grpc.MaxCallRecvMsgSize(1024 * 1024 * constant.GroupRPCRecvSize)
client := rpc.NewGroupClient(etcdConn)
- RpcResp, err := client.GetGroupAllMember(context.Background(), req)
+ RpcResp, err := client.GetGroupAllMember(context.Background(), req, maxSizeOption)
if err != nil {
- log.NewError(req.OperationID, "GetGroupAllMember failed ", err.Error(), req.String())
+ log.NewError(req.OperationID, "GetGroupAllMember failed err", err.Error(), req.String())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList}
memberListResp.Data = jsonData.JsonDataList(memberListResp.MemberList)
- log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp)
+ log.NewInfo(req.OperationID, "GetGroupAllMember api return ", len(memberListResp.MemberList))
c.JSON(http.StatusOK, memberListResp)
}
@@ -275,9 +277,9 @@ func GetJoinedGroupList(c *gin.Context) {
log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -335,9 +337,9 @@ func InviteUserToGroup(c *gin.Context) {
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -405,9 +407,9 @@ func CreateGroup(c *gin.Context) {
log.NewInfo(req.OperationID, "CreateGroup args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -461,9 +463,9 @@ func GetRecvGroupApplicationList(c *gin.Context) {
}
log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -513,9 +515,9 @@ func GetUserReqGroupApplicationList(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -567,9 +569,9 @@ func GetGroupsInfo(c *gin.Context) {
}
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -637,9 +639,9 @@ func ApplicationGroupResponse(c *gin.Context) {
log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -690,9 +692,9 @@ func JoinGroup(c *gin.Context) {
}
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -744,9 +746,9 @@ func QuitGroup(c *gin.Context) {
log.NewInfo(req.OperationID, "QuitGroup args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -798,9 +800,9 @@ func SetGroupInfo(c *gin.Context) {
log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -865,9 +867,9 @@ func TransferGroupOwner(c *gin.Context) {
log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -919,9 +921,9 @@ func DismissGroup(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -973,9 +975,9 @@ func MuteGroupMember(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1027,9 +1029,9 @@ func CancelMuteGroupMember(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1081,9 +1083,9 @@ func MuteGroup(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1135,9 +1137,9 @@ func CancelMuteGroup(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1179,9 +1181,9 @@ func SetGroupMemberNickname(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1249,10 +1251,10 @@ func SetGroupMemberInfo(c *gin.Context) {
if req.RoleLevel != nil {
reqPb.RoleLevel = &wrappers.Int32Value{Value: *req.RoleLevel}
}
-
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", reqPb.String())
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -1267,6 +1269,52 @@ func SetGroupMemberInfo(c *gin.Context) {
resp.ErrMsg = respPb.CommonResp.ErrMsg
resp.ErrCode = respPb.CommonResp.ErrCode
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", resp)
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp)
c.JSON(http.StatusOK, resp)
}
+
+func GetGroupAbstractInfo(c *gin.Context) {
+ var (
+ req api.GetGroupAbstractInfoReq
+ resp api.GetGroupAbstractInfoResp
+ )
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", "BindJSON failed ", err.Error())
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
+ return
+ }
+ ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
+ if !ok {
+ errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
+ log.NewError(req.OperationID, errMsg)
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ if etcdConn == nil {
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
+ log.NewError(req.OperationID, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ client := rpc.NewGroupClient(etcdConn)
+ respPb, err := client.GetGroupAbstractInfo(context.Background(), &rpc.GetGroupAbstractInfoReq{
+ GroupID: req.GroupID,
+ OpUserID: opUserID,
+ OperationID: req.OperationID,
+ })
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", respPb.String())
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", err.Error())
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
+ return
+ }
+ resp.ErrMsg = respPb.CommonResp.ErrMsg
+ resp.ErrCode = respPb.CommonResp.ErrCode
+ resp.GroupMemberNumber = respPb.GroupMemberNumber
+ resp.GroupMemberListHash = respPb.GroupMemberListHash
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp)
+ c.JSON(http.StatusOK, resp)
+ return
+}
diff --git a/internal/api/group/super_group.go b/internal/api/group/super_group.go
index 27a0aa841..9911ee7b4 100644
--- a/internal/api/group/super_group.go
+++ b/internal/api/group/super_group.go
@@ -31,9 +31,9 @@ func GetJoinedSuperGroupList(c *gin.Context) {
return
}
reqPb := rpc.GetJoinedSuperGroupListReq{OperationID: req.OperationID, OpUserID: opUserID, UserID: req.FromUserID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -67,9 +67,9 @@ func GetSuperGroupsInfo(c *gin.Context) {
return
}
reqPb := rpc.GetSuperGroupsInfoReq{OperationID: req.OperationID, OpUserID: opUserID, GroupIDList: req.GroupIDList}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go
index 98d4ac98b..b65294379 100644
--- a/internal/api/manage/management_chat.go
+++ b/internal/api/manage/management_chat.go
@@ -10,20 +10,21 @@ import (
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
+ "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbChat "Open_IM/pkg/proto/msg"
- "Open_IM/pkg/proto/sdk_ws"
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
+ "net/http"
+ "strings"
+
"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
"github.com/golang/protobuf/proto"
"github.com/mitchellh/mapstructure"
- "net/http"
- "strings"
)
var validate *validator.Validate
@@ -50,6 +51,8 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
case constant.Video:
fallthrough
case constant.File:
+ fallthrough
+ case constant.AdvancedRevoke:
newContent = utils.StructToJsonString(params.Content)
case constant.Revoke:
newContent = params.Content["revokeMsgClientID"].(string)
@@ -145,6 +148,8 @@ func ManagementSendMsg(c *gin.Context) {
data = CustomElem{}
case constant.Revoke:
data = RevokeElem{}
+ case constant.AdvancedRevoke:
+ data = MessageRevoked{}
case constant.OANotification:
data = OANotificationElem{}
params.SessionType = constant.NotificationChatType
@@ -189,7 +194,7 @@ func ManagementSendMsg(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""})
return
}
- case constant.GroupChatType:
+ case constant.GroupChatType, constant.SuperGroupChatType:
if len(params.GroupID) == 0 {
log.NewError(params.OperationID, "groupID is a null string")
c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""})
@@ -202,9 +207,9 @@ func ManagementSendMsg(c *gin.Context) {
pbData := newUserSendMsgReq(¶ms)
log.Info(params.OperationID, "", "api ManagementSendMsg call start..., [data: %s]", pbData.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
if etcdConn == nil {
- errMsg := params.OperationID + "getcdv3.GetConn == nil"
+ errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(params.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -227,7 +232,7 @@ func ManagementSendMsg(c *gin.Context) {
}
}
log.Info(params.OperationID, "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String())
- resp := api.ManagementSendMsgResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, ResultList: server_api_params.UserSendMsgResp{ServerMsgID: RpcResp.ServerMsgID, ClientMsgID: RpcResp.ClientMsgID, SendTime: RpcResp.SendTime}}
+ resp := api.ManagementSendMsgResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, ResultList: open_im_sdk.UserSendMsgResp{ServerMsgID: RpcResp.ServerMsgID, ClientMsgID: RpcResp.ClientMsgID, SendTime: RpcResp.SendTime}}
log.Info(params.OperationID, "ManagementSendMsg return", resp)
c.JSON(http.StatusOK, resp)
}
@@ -315,9 +320,9 @@ func ManagementBatchSendMsg(c *gin.Context) {
log.NewInfo(params.OperationID, "Ws call success to ManagementSendMsgReq", params)
var msgSendFailedFlag bool
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
if etcdConn == nil {
- errMsg := params.OperationID + "getcdv3.GetConn == nil"
+ errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(params.OperationID, errMsg)
//resp.Data.FailedIDList = params.RecvIDList
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "rpc server error: etcdConn == nil"})
@@ -328,7 +333,17 @@ func ManagementBatchSendMsg(c *gin.Context) {
ManagementSendMsg: params.ManagementSendMsg,
}
pbData := newUserSendMsgReq(req)
- for _, recvID := range params.RecvIDList {
+ var recvList []string
+ if params.IsSendAll {
+ recvList, err = im_mysql_model.SelectAllUserID()
+ if err != nil {
+ log.NewError(params.OperationID, utils.GetSelfFuncName(), err.Error())
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
+ }
+ } else {
+ recvList = params.RecvIDList
+ }
+ for _, recvID := range recvList {
pbData.MsgData.RecvID = recvID
log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String())
@@ -374,9 +389,9 @@ func CheckMsgIsSendSuccess(c *gin.Context) {
log.Error(c.PostForm("operationID"), "json unmarshal err", err.Error(), c.PostForm("content"))
return
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -473,3 +488,10 @@ type OANotificationElem struct {
FileElem FileElem `mapstructure:"fileElem" json:"fileElem"`
Ex string `mapstructure:"ex" json:"ex"`
}
+type MessageRevoked struct {
+ RevokerID string `mapstructure:"notificationName" json:"revokerID" validate:"required"`
+ RevokerRole int32 `mapstructure:"notificationName" json:"revokerRole" validate:"required"`
+ ClientMsgID string `mapstructure:"notificationName" json:"clientMsgID" validate:"required"`
+ RevokerNickname string `mapstructure:"notificationName" json:"revokerNickname"`
+ SessionType int32 `mapstructure:"notificationName" json:"sessionType" validate:"required"`
+}
diff --git a/internal/api/manage/management_user.go b/internal/api/manage/management_user.go
index eb2985258..bbbfb2f2c 100644
--- a/internal/api/manage/management_user.go
+++ b/internal/api/manage/management_user.go
@@ -17,9 +17,10 @@ import (
rpc "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
"context"
- "github.com/gin-gonic/gin"
"net/http"
"strings"
+
+ "github.com/gin-gonic/gin"
)
func DeleteUser(c *gin.Context) {
@@ -42,9 +43,9 @@ func DeleteUser(c *gin.Context) {
}
log.NewInfo(params.OperationID, "DeleteUser args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -97,9 +98,9 @@ func GetAllUsersUid(c *gin.Context) {
}
log.NewInfo(params.OperationID, "GetAllUsersUid args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -152,9 +153,9 @@ func AccountCheck(c *gin.Context) {
}
log.NewInfo(params.OperationID, "AccountCheck args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -198,7 +199,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
flag := false
- grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
for _, v := range grpcCons {
client := pbRelay.NewRelayClient(v)
reply, err := client.GetUsersOnlineStatus(context.Background(), req)
diff --git a/internal/api/msg/del_msg.go b/internal/api/msg/del_msg.go
index 2ae84505f..07322f8d9 100644
--- a/internal/api/msg/del_msg.go
+++ b/internal/api/msg/del_msg.go
@@ -54,9 +54,9 @@ func DelMsg(c *gin.Context) {
return
}
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if grpcConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -79,11 +79,11 @@ func DelSuperGroupMsg(c *gin.Context) {
resp api.DelSuperGroupMsgResp
)
rpcReq := &rpc.DelSuperGroupMsgReq{}
- utils.CopyStructFields(req, &req)
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
+ utils.CopyStructFields(rpcReq, &req)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
var ok bool
var errInfo string
@@ -130,9 +130,9 @@ func DelSuperGroupMsg(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
log.Info(req.OperationID, "", "api DelSuperGroupMsg call start..., [data: %s]", pbData.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -140,8 +140,8 @@ func DelSuperGroupMsg(c *gin.Context) {
client := rpc.NewMsgClient(etcdConn)
log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...")
- if req.IsAllDelete {
- RpcResp, err := client.DelSuperGroupMsg(context.Background(),rpcReq)
+ if req.IsAllDelete {
+ RpcResp, err := client.DelSuperGroupMsg(context.Background(), rpcReq)
if err != nil {
log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"})
@@ -152,7 +152,7 @@ func DelSuperGroupMsg(c *gin.Context) {
resp.ErrMsg = RpcResp.ErrMsg
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
- }else{
+ } else {
RpcResp, err := client.SendMsg(context.Background(), &pbData)
if err != nil {
log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error())
@@ -203,9 +203,9 @@ func ClearMsg(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -251,9 +251,9 @@ func SetMsgMinSeq(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + " getcdv3.GetConn == nil"
+ errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/msg/get_max_min_seq.go b/internal/api/msg/get_max_min_seq.go
index 193fc9322..5b5a7a551 100644
--- a/internal/api/msg/get_max_min_seq.go
+++ b/internal/api/msg/get_max_min_seq.go
@@ -35,9 +35,9 @@ func GetSeq(c *gin.Context) {
pbData := sdk_ws.GetMaxAndMinSeqReq{}
pbData.UserID = params.SendID
pbData.OperationID = params.OperationID
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
if grpcConn == nil {
- errMsg := pbData.OperationID + " getcdv3.GetConn == nil"
+ errMsg := pbData.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(pbData.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/msg/pull_msg.go b/internal/api/msg/pull_msg.go
index 418c3b708..9e27619bd 100644
--- a/internal/api/msg/pull_msg.go
+++ b/internal/api/msg/pull_msg.go
@@ -51,9 +51,9 @@ func PullMsgBySeqList(c *gin.Context) {
pbData.OperationID = params.OperationID
pbData.SeqList = params.SeqList
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
if grpcConn == nil {
- errMsg := pbData.OperationID + "getcdv3.GetConn == nil"
+ errMsg := pbData.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(pbData.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/msg/send_msg.go b/internal/api/msg/send_msg.go
index 7b41d0866..93502fe33 100644
--- a/internal/api/msg/send_msg.go
+++ b/internal/api/msg/send_msg.go
@@ -71,9 +71,9 @@ func SendMsg(c *gin.Context) {
pbData := newUserSendMsgReq(token, ¶ms)
log.Info(params.OperationID, "", "api SendMsg call start..., [data: %s]", pbData.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
if etcdConn == nil {
- errMsg := params.OperationID + "getcdv3.GetConn == nil"
+ errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(params.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/office/tag.go b/internal/api/office/tag.go
index c64e736cd..d16d514e0 100644
--- a/internal/api/office/tag.go
+++ b/internal/api/office/tag.go
@@ -54,9 +54,9 @@ func GetUserTags(c *gin.Context) {
reqPb.UserID = userID
reqPb.OperationID = req.OperationID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -119,9 +119,9 @@ func CreateTag(c *gin.Context) {
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -179,9 +179,9 @@ func DeleteTag(c *gin.Context) {
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -239,9 +239,9 @@ func SetTag(c *gin.Context) {
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -299,9 +299,9 @@ func SendMsg2Tag(c *gin.Context) {
}
reqPb.SendID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -361,9 +361,9 @@ func GetTagSendLogs(c *gin.Context) {
PageNumber: req.PageNumber,
ShowNumber: req.ShowNumber,
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -428,9 +428,9 @@ func GetUserTagByID(c *gin.Context) {
reqPb.UserID = userID
reqPb.OperationID = req.OperationID
reqPb.TagID = req.TagID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/office/work_moments.go b/internal/api/office/work_moments.go
index 0c37f5b1d..7a8a8d7d7 100644
--- a/internal/api/office/work_moments.go
+++ b/internal/api/office/work_moments.go
@@ -56,9 +56,9 @@ func CreateOneWorkMoment(c *gin.Context) {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
reqPb.WorkMoment.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -120,9 +120,9 @@ func DeleteOneWorkMoment(c *gin.Context) {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -183,9 +183,9 @@ func LikeOneWorkMoment(c *gin.Context) {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -245,9 +245,9 @@ func CommentOneWorkMoment(c *gin.Context) {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -305,9 +305,9 @@ func DeleteComment(c *gin.Context) {
return
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -366,9 +366,9 @@ func GetWorkMomentByID(c *gin.Context) {
reqPb.OperationID = req.OperationID
reqPb.OpUserID = userID
reqPb.WorkMomentID = req.WorkMomentID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -436,9 +436,9 @@ func GetUserWorkMoments(c *gin.Context) {
}
reqPb.OpUserID = opUserID
reqPb.UserID = req.UserID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -548,9 +548,9 @@ func GetUserFriendWorkMoments(c *gin.Context) {
ShowNumber: req.ShowNumber,
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -649,9 +649,9 @@ func SetUserWorkMomentsLevel(c *gin.Context) {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
reqPb.UserID = userID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go
index 1d6542306..42b6a9de7 100644
--- a/internal/api/organization/organization.go
+++ b/internal/api/organization/organization.go
@@ -48,9 +48,9 @@ func CreateDepartment(c *gin.Context) {
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -103,9 +103,9 @@ func UpdateDepartment(c *gin.Context) {
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -156,9 +156,9 @@ func GetSubDepartment(c *gin.Context) {
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -212,9 +212,9 @@ func DeleteDepartment(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -266,9 +266,9 @@ func CreateOrganizationUser(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -319,9 +319,9 @@ func UpdateOrganizationUser(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -372,9 +372,9 @@ func CreateDepartmentMember(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -425,9 +425,9 @@ func GetUserInDepartment(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -479,9 +479,9 @@ func UpdateUserInDepartment(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -532,9 +532,9 @@ func DeleteOrganizationUser(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -584,9 +584,9 @@ func GetDepartmentMember(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -637,9 +637,9 @@ func DeleteUserInDepartment(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/api/third/fcm_update_token.go b/internal/api/third/fcm_update_token.go
index d9c5f03ff..000deaabb 100644
--- a/internal/api/third/fcm_update_token.go
+++ b/internal/api/third/fcm_update_token.go
@@ -1,6 +1,7 @@
package apiThird
import (
+ api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
@@ -10,18 +11,10 @@ import (
"github.com/gin-gonic/gin"
)
-/**
- * FCM第三方上报Token
- */
-type FcmUpdateTokenReq struct {
- OperationID string `json:"operationID"`
- Platform int `json:"platform" binding:"required,min=1,max=2"` //only for ios + android
- FcmToken string `json:"fcmToken"`
-}
-
func FcmUpdateToken(c *gin.Context) {
var (
- req FcmUpdateTokenReq
+ req api.FcmUpdateTokenReq
+ resp api.FcmUpdateTokenResp
)
if err := c.Bind(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
@@ -34,7 +27,9 @@ func FcmUpdateToken(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ resp.ErrCode = 500
+ resp.ErrMsg = errMsg
+ c.JSON(http.StatusInternalServerError, resp)
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req, UserId)
@@ -43,10 +38,12 @@ func FcmUpdateToken(c *gin.Context) {
if err != nil {
errMsg := req.OperationID + " " + "SetFcmToken failed " + err.Error() + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ resp.ErrCode = 500
+ resp.ErrMsg = errMsg
+ c.JSON(http.StatusInternalServerError, resp)
return
}
//逻辑处理完毕
- c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
+ c.JSON(http.StatusOK, resp)
return
}
diff --git a/internal/api/third/minio_init.go b/internal/api/third/minio_init.go
index 393122858..b1088df50 100644
--- a/internal/api/third/minio_init.go
+++ b/internal/api/third/minio_init.go
@@ -32,6 +32,7 @@ func MinioInit() {
}
opts := &minio.Options{
Creds: credentials.NewStaticV4(config.Config.Credential.Minio.AccessKeyID, config.Config.Credential.Minio.SecretAccessKey, ""),
+ //Region: config.Config.Credential.Minio.Location,
}
if minioUrl.Scheme == "http" {
opts.Secure = false
@@ -46,8 +47,10 @@ func MinioInit() {
return
}
opt := minio.MakeBucketOptions{
- Region: config.Config.Credential.Minio.Location,
- ObjectLocking: false,
+ Region: config.Config.Credential.Minio.Location,
+ }
+ if config.Config.Credential.Minio.IsDistributedMod == true {
+ opt.ObjectLocking = true
}
err = MinioClient.MakeBucket(context.Background(), config.Config.Credential.Minio.Bucket, opt)
if err != nil {
@@ -78,6 +81,9 @@ func MinioInit() {
return
}
}
+ policy, err := MinioClient.GetBucketPolicy(context.Background(), config.Config.Credential.Minio.Bucket)
+ log.NewInfo("", utils.GetSelfFuncName(), policy)
+
// 自动化桶public的代码
policyJsonString := fmt.Sprintf(`{"Version": "2012-10-17","Statement": [{"Action": ["s3:GetObject","s3:PutObject"],
"Effect": "Allow","Principal": {"AWS": ["*"]},"Resource": ["arn:aws:s3:::%s/*"],"Sid": ""}]}`, config.Config.Credential.Minio.Bucket)
diff --git a/internal/api/third/minio_storage_credential.go b/internal/api/third/minio_storage_credential.go
index 7f6c81638..ac4be4273 100644
--- a/internal/api/third/minio_storage_credential.go
+++ b/internal/api/third/minio_storage_credential.go
@@ -15,6 +15,8 @@ import (
_ "github.com/minio/minio-go/v7"
cr "github.com/minio/minio-go/v7/pkg/credentials"
"net/http"
+ "strconv"
+ "strings"
)
// @Summary minio上传文件(web api)
@@ -161,6 +163,7 @@ func MinioStorageCredential(c *gin.Context) {
resp.BucketName = config.Config.Credential.Minio.Bucket
resp.StsEndpointURL = config.Config.Credential.Minio.Endpoint
resp.StorageTime = config.Config.Credential.Minio.StorageTime
+ resp.IsDistributedMod = config.Config.Credential.Minio.IsDistributedMod
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}
@@ -175,6 +178,7 @@ func UploadUpdateApp(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
+
var yamlName string
if req.Yaml == nil {
yamlName = ""
@@ -217,6 +221,13 @@ func UploadUpdateApp(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
+func version2Int(version string) (int, error) {
+ versions := strings.Split(version, ".")
+ s := strings.Join(versions, "")
+ versionInt, err := strconv.Atoi(s)
+ return versionInt, err
+}
+
func GetDownloadURL(c *gin.Context) {
var (
req api.GetDownloadURLReq
@@ -237,7 +248,13 @@ func GetDownloadURL(c *gin.Context) {
}
log.Debug(req.OperationID, utils.GetSelfFuncName(), "app: ", app)
if app != nil {
- if app.Version != req.Version && app.Version != "" {
+ appVersion, err := version2Int(app.Version)
+ reqVersion, err := version2Int(req.Version)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), "req version", req.Version, "app version", app.Version)
+ }
+ log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "req version:", reqVersion, "app version:", appVersion)
+ if appVersion > reqVersion && app.Version != "" {
resp.Data.HasNewVersion = true
if app.ForceUpdate == true {
resp.Data.ForceUpdate = true
diff --git a/internal/api/user/user.go b/internal/api/user/user.go
index 48171ece0..bef11c3a9 100644
--- a/internal/api/user/user.go
+++ b/internal/api/user/user.go
@@ -14,9 +14,10 @@ import (
rpc "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
"context"
- "github.com/gin-gonic/gin"
"net/http"
"strings"
+
+ "github.com/gin-gonic/gin"
)
func GetUsersInfoFromCache(c *gin.Context) {
@@ -38,9 +39,9 @@ func GetUsersInfoFromCache(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -86,9 +87,9 @@ func GetFriendIDListFromCache(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -128,9 +129,9 @@ func GetBlackIDListFromCache(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -181,9 +182,9 @@ func GetUsersInfo(c *gin.Context) {
log.NewInfo(params.OperationID, "GetUserInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -239,9 +240,9 @@ func UpdateUserInfo(c *gin.Context) {
return
}
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -290,9 +291,9 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
return
}
log.NewInfo(params.OperationID, "SetGlobalRecvMessageOpt args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -324,9 +325,9 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
func GetSelfUserInfo(c *gin.Context) {
params := api.GetSelfUserInfoReq{}
if err := c.BindJSON(¶ms); err != nil {
- errMsg := "BindJSON failed " + err.Error()
- log.NewError("0", "BindJSON failed ", errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
+ errMsg := " BindJSON failed " + err.Error()
+ log.NewError("0", errMsg)
+ c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg})
return
}
req := &rpc.GetUserInfoReq{}
@@ -338,17 +339,17 @@ func GetSelfUserInfo(c *gin.Context) {
ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
- log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
+ log.NewError(params.OperationID, errMsg)
+ c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg})
return
}
- req.UserIDList = append(req.UserIDList, req.OpUserID)
+ req.UserIDList = append(req.UserIDList, params.UserID)
log.NewInfo(params.OperationID, "GetUserInfo args ", req.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -366,11 +367,10 @@ func GetSelfUserInfo(c *gin.Context) {
log.NewInfo(req.OperationID, "GetUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
} else {
- resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
+ resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}
log.NewInfo(req.OperationID, "GetUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
}
-
}
// @Summary 获取用户在线状态
@@ -415,7 +415,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
flag := false
- grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
for _, v := range grpcCons {
log.Debug(params.OperationID, "get node ", *v, v.Target())
client := pbRelay.NewRelayClient(v)
diff --git a/internal/cms_api/admin/admin.go b/internal/cms_api/admin/admin.go
index a741c8016..c71689c57 100644
--- a/internal/cms_api/admin/admin.go
+++ b/internal/cms_api/admin/admin.go
@@ -8,15 +8,18 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbAdmin "Open_IM/pkg/proto/admin_cms"
+ pbCommon "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
- "github.com/minio/minio-go/v7"
- "github.com/minio/minio-go/v7/pkg/credentials"
"net/http"
"strings"
- "github.com/gin-gonic/gin"
+ "github.com/minio/minio-go/v7"
+ "github.com/minio/minio-go/v7/pkg/credentials"
+
url2 "net/url"
+
+ "github.com/gin-gonic/gin"
)
var (
@@ -63,16 +66,16 @@ func AdminLogin(c *gin.Context) {
reqPb pbAdmin.AdminLoginReq
)
if err := c.BindJSON(&req); err != nil {
- log.NewInfo("0", utils.GetSelfFuncName(), err.Error())
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
reqPb.Secret = req.Secret
reqPb.AdminID = req.AdminName
reqPb.OperationID = utils.OperationIDGenerator()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -87,3 +90,94 @@ func AdminLogin(c *gin.Context) {
resp.Token = respPb.Token
openIMHttp.RespHttp200(c, constant.OK, resp)
}
+
+func AddUserRegisterAddFriendIDList(c *gin.Context) {
+ var (
+ req apiStruct.AddUserRegisterAddFriendIDListRequest
+ resp apiStruct.AddUserRegisterAddFriendIDListResponse
+ )
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
+ openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
+ if etcdConn == nil {
+ errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ log.NewError(req.OperationID, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ client := pbAdmin.NewAdminCMSClient(etcdConn)
+ _, err := client.AddUserRegisterAddFriendIDList(context.Background(), &pbAdmin.AddUserRegisterAddFriendIDListReq{OperationID: req.OperationID, UserIDList: req.UserIDList})
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
+ openIMHttp.RespHttp200(c, err, nil)
+ return
+ }
+ openIMHttp.RespHttp200(c, constant.OK, resp)
+}
+
+func ReduceUserRegisterAddFriendIDList(c *gin.Context) {
+ var (
+ req apiStruct.ReduceUserRegisterAddFriendIDListRequest
+ resp apiStruct.ReduceUserRegisterAddFriendIDListResponse
+ )
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
+ openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
+ if etcdConn == nil {
+ errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ log.NewError(req.OperationID, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ client := pbAdmin.NewAdminCMSClient(etcdConn)
+ _, err := client.ReduceUserRegisterAddFriendIDList(context.Background(), &pbAdmin.ReduceUserRegisterAddFriendIDListReq{OperationID: req.OperationID, UserIDList: req.UserIDList, Operation: req.Operation})
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
+ openIMHttp.RespHttp200(c, err, nil)
+ return
+ }
+ openIMHttp.RespHttp200(c, constant.OK, resp)
+}
+
+func GetUserRegisterAddFriendIDList(c *gin.Context) {
+ var (
+ req apiStruct.GetUserRegisterAddFriendIDListRequest
+ resp apiStruct.GetUserRegisterAddFriendIDListResponse
+ )
+ if err := c.BindJSON(&req); err != nil {
+ log.NewError("0", utils.GetSelfFuncName(), err.Error())
+ openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
+ if etcdConn == nil {
+ errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ log.NewError(req.OperationID, errMsg)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ return
+ }
+ client := pbAdmin.NewAdminCMSClient(etcdConn)
+ respPb, err := client.GetUserRegisterAddFriendIDList(context.Background(), &pbAdmin.GetUserRegisterAddFriendIDListReq{OperationID: req.OperationID, Pagination: &pbCommon.RequestPagination{
+ PageNumber: int32(req.PageNumber),
+ ShowNumber: int32(req.ShowNumber),
+ }})
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
+ openIMHttp.RespHttp200(c, err, nil)
+ return
+ }
+ resp.Users = respPb.UserInfoList
+ resp.ShowNumber = int(respPb.Pagination.ShowNumber)
+ resp.CurrentPage = int(respPb.Pagination.CurrentPage)
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
+ openIMHttp.RespHttp200(c, constant.OK, resp)
+}
diff --git a/internal/cms_api/group/group.go b/internal/cms_api/group/group.go
index 54b6f64fe..a3e58a645 100644
--- a/internal/cms_api/group/group.go
+++ b/internal/cms_api/group/group.go
@@ -18,11 +18,11 @@ import (
"github.com/gin-gonic/gin"
)
-func GetGroupById(c *gin.Context) {
+func GetGroupByID(c *gin.Context) {
var (
- req cms_api_struct.GetGroupByIdRequest
- resp cms_api_struct.GetGroupByIdResponse
- reqPb pbGroup.GetGroupByIdReq
+ req cms_api_struct.GetGroupByIDRequest
+ resp cms_api_struct.GetGroupByIDResponse
+ reqPb pbGroup.GetGroupByIDReq
)
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
@@ -31,28 +31,25 @@ func GetGroupById(c *gin.Context) {
}
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ reqPb.GroupID = req.GroupID
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := pbGroup.NewGroupClient(etcdConn)
- respPb, err := client.GetGroupById(context.Background(), &reqPb)
+ respPb, err := client.GetGroupByID(context.Background(), &reqPb)
if err != nil {
log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetGroupById failed ", err.Error())
openIMHttp.RespHttp200(c, err, nil)
return
}
- resp.GroupName = respPb.CMSGroup.GroupInfo.GroupName
- resp.GroupID = respPb.CMSGroup.GroupInfo.GroupID
- resp.CreateTime = (utils.UnixSecondToTime(int64(respPb.CMSGroup.GroupInfo.CreateTime))).String()
- resp.ProfilePhoto = respPb.CMSGroup.GroupInfo.FaceURL
- resp.GroupMasterName = respPb.CMSGroup.GroupMasterName
- resp.GroupMasterId = respPb.CMSGroup.GroupMasterId
- resp.IsBanChat = constant.GroupIsBanChat(respPb.CMSGroup.GroupInfo.Status)
+ utils.CopyStructFields(&resp, respPb.CMSGroup.GroupInfo)
+ resp.GroupOwnerID = respPb.CMSGroup.GroupOwnerUserID
+ resp.GroupOwnerName = respPb.CMSGroup.GroupOwnerUserName
+
log.NewInfo("", utils.GetSelfFuncName(), "req: ", resp)
openIMHttp.RespHttp200(c, constant.OK, resp)
}
@@ -72,9 +69,9 @@ func GetGroups(c *gin.Context) {
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
reqPb.Pagination = &commonPb.RequestPagination{}
utils.CopyStructFields(&reqPb.Pagination, req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -87,16 +84,11 @@ func GetGroups(c *gin.Context) {
return
}
for _, v := range respPb.CMSGroups {
- resp.Groups = append(resp.Groups, cms_api_struct.GroupResponse{
- GroupName: v.GroupInfo.GroupName,
- GroupID: v.GroupInfo.GroupID,
- GroupMasterName: v.GroupMasterName,
- GroupMasterId: v.GroupMasterId,
- CreateTime: (utils.UnixSecondToTime(int64(v.GroupInfo.CreateTime))).String(),
- IsBanChat: constant.GroupIsBanChat(v.GroupInfo.Status),
- IsBanPrivateChat: false,
- ProfilePhoto: v.GroupInfo.FaceURL,
- })
+ groupResp := cms_api_struct.GroupResponse{}
+ utils.CopyStructFields(&groupResp, v.GroupInfo)
+ groupResp.GroupOwnerName = v.GroupOwnerUserName
+ groupResp.GroupOwnerID = v.GroupOwnerUserID
+ resp.Groups = append(resp.Groups, groupResp)
}
resp.GroupNums = int(respPb.GroupNum)
resp.CurrentPage = int(respPb.Pagination.PageNumber)
@@ -121,9 +113,9 @@ func GetGroupByName(c *gin.Context) {
reqPb.GroupName = req.GroupName
reqPb.Pagination = &commonPb.RequestPagination{}
utils.CopyStructFields(&reqPb.Pagination, req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -136,16 +128,11 @@ func GetGroupByName(c *gin.Context) {
return
}
for _, v := range respPb.CMSGroups {
- resp.Groups = append(resp.Groups, cms_api_struct.GroupResponse{
- GroupName: v.GroupInfo.GroupName,
- GroupID: v.GroupInfo.GroupID,
- GroupMasterName: v.GroupMasterName,
- GroupMasterId: v.GroupMasterId,
- CreateTime: (utils.UnixSecondToTime(int64(v.GroupInfo.CreateTime))).String(),
- IsBanChat: constant.GroupIsBanChat(v.GroupInfo.Status),
- IsBanPrivateChat: false,
- ProfilePhoto: v.GroupInfo.FaceURL,
- })
+ groupResp := cms_api_struct.GroupResponse{}
+ utils.CopyStructFields(&groupResp, v.GroupInfo)
+ groupResp.GroupOwnerName = v.GroupOwnerUserName
+ groupResp.GroupOwnerID = v.GroupOwnerUserID
+ resp.Groups = append(resp.Groups, groupResp)
}
resp.CurrentPage = int(respPb.Pagination.PageNumber)
resp.ShowNumber = int(respPb.Pagination.ShowNumber)
@@ -178,9 +165,9 @@ func CreateGroup(c *gin.Context) {
RoleLevel: 1,
})
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -195,133 +182,6 @@ func CreateGroup(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, nil)
}
-func BanGroupChat(c *gin.Context) {
- var (
- req cms_api_struct.BanGroupChatRequest
- reqPb pbGroup.OperateGroupStatusReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed", err.Error())
- openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.Status = constant.GroupBanChat
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- client := pbGroup.NewGroupClient(etcdConn)
- _, err := client.OperateGroupStatus(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BanGroupChat failed ", err.Error())
- openIMHttp.RespHttp200(c, err, nil)
- return
- }
- openIMHttp.RespHttp200(c, constant.OK, nil)
-
-}
-
-func BanPrivateChat(c *gin.Context) {
- var (
- req cms_api_struct.BanPrivateChatRequest
- reqPb pbGroup.OperateGroupStatusReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.Status = constant.GroupBanPrivateChat
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbGroup.NewGroupClient(etcdConn)
- _, err := client.OperateGroupStatus(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "OperateGroupStatus failed", err.Error())
- openIMHttp.RespHttp200(c, err, nil)
- return
- }
- openIMHttp.RespHttp200(c, constant.OK, nil)
-}
-
-func OpenGroupChat(c *gin.Context) {
- var (
- req cms_api_struct.BanPrivateChatRequest
- reqPb pbGroup.OperateGroupStatusReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.Status = constant.GroupOk
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbGroup.NewGroupClient(etcdConn)
- _, err := client.OperateGroupStatus(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "OperateGroupStatus failed ", err.Error())
- openIMHttp.RespHttp200(c, err, nil)
- return
- }
- openIMHttp.RespHttp200(c, constant.OK, nil)
-}
-
-func OpenPrivateChat(c *gin.Context) {
- var (
- req cms_api_struct.BanPrivateChatRequest
- reqPb pbGroup.OperateGroupStatusReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "OpenPrivateChat failed ", err.Error())
- openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.Status = constant.GroupOk
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
-
- client := pbGroup.NewGroupClient(etcdConn)
- _, err := client.OperateGroupStatus(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "OperateGroupStatus failed ", err.Error())
- openIMHttp.RespHttp200(c, err, nil)
- return
- }
- openIMHttp.RespHttp200(c, constant.OK, nil)
-}
-
func GetGroupMembers(c *gin.Context) {
var (
req cms_api_struct.GetGroupMembersRequest
@@ -339,11 +199,11 @@ func GetGroupMembers(c *gin.Context) {
PageNumber: int32(req.PageNumber),
ShowNumber: int32(req.ShowNumber),
}
- reqPb.GroupId = req.GroupId
+ reqPb.GroupID = req.GroupID
reqPb.UserName = req.UserName
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -360,13 +220,10 @@ func GetGroupMembers(c *gin.Context) {
ShowNumber: int(respPb.Pagination.ShowNumber),
}
resp.MemberNums = int(respPb.MemberNums)
- for _, groupMembers := range respPb.Members {
- resp.GroupMembers = append(resp.GroupMembers, cms_api_struct.GroupMemberResponse{
- MemberPosition: int(groupMembers.RoleLevel),
- MemberNickName: groupMembers.Nickname,
- MemberId: groupMembers.UserID,
- JoinTime: utils.UnixSecondToTime(int64(groupMembers.JoinTime)).String(),
- })
+ for _, groupMember := range respPb.Members {
+ memberResp := cms_api_struct.GroupMemberResponse{}
+ utils.CopyStructFields(&memberResp, groupMember)
+ resp.GroupMembers = append(resp.GroupMembers, memberResp)
}
log.NewInfo("", utils.GetSelfFuncName(), "req: ", resp)
openIMHttp.RespHttp200(c, constant.OK, resp)
@@ -379,25 +236,25 @@ func AddGroupMembers(c *gin.Context) {
reqPb pbGroup.AddGroupMembersCMSReq
)
if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationId, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
+ log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
- reqPb.OperationId = utils.OperationIDGenerator()
+ reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo("", utils.GetSelfFuncName(), "req: ", req)
- reqPb.UserIds = req.Members
- reqPb.GroupId = req.GroupId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationId)
+ reqPb.UserIDList = req.Members
+ reqPb.GroupID = req.GroupId
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationId + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationId, errMsg)
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
+ log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := pbGroup.NewGroupClient(etcdConn)
respPb, err := client.AddGroupMembersCMS(context.Background(), &reqPb)
if err != nil {
- log.NewError(reqPb.OperationId, utils.GetSelfFuncName(), "AddGroupMembersCMS failed", err.Error())
+ log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "AddGroupMembersCMS failed", err.Error())
openIMHttp.RespHttp200(c, err, nil)
return
}
@@ -420,11 +277,11 @@ func RemoveGroupMembers(c *gin.Context) {
}
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.UserIds = req.Members
- reqPb.GroupId = req.GroupId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ reqPb.UserIDList = req.Members
+ reqPb.GroupID = req.GroupId
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -442,38 +299,7 @@ func RemoveGroupMembers(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, resp)
}
-func DeleteGroup(c *gin.Context) {
- var (
- req cms_api_struct.DeleteGroupRequest
- _ cms_api_struct.DeleteGroupResponse
- reqPb pbGroup.DeleteGroupReq
- )
- if err := c.BindJSON(&req); err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
- openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
- return
- }
- reqPb.OperationID = utils.OperationIDGenerator()
- log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
- if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
- log.NewError(reqPb.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
- return
- }
- client := pbGroup.NewGroupClient(etcdConn)
- _, err := client.DeleteGroup(context.Background(), &reqPb)
- if err != nil {
- log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "DeleteGroup failed", err.Error())
- openIMHttp.RespHttp200(c, err, nil)
- return
- }
- openIMHttp.RespHttp200(c, constant.OK, nil)
-}
-
-func SetGroupMaster(c *gin.Context) {
+func SetGroupOwner(c *gin.Context) {
var (
req cms_api_struct.SetGroupMasterRequest
_ cms_api_struct.SetGroupMasterResponse
@@ -486,12 +312,12 @@ func SetGroupMaster(c *gin.Context) {
}
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.UserId = req.UserId
+ reqPb.GroupID = req.GroupId
+ reqPb.UserID = req.UserId
reqPb.RoleLevel = constant.GroupOwner
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -519,12 +345,12 @@ func SetGroupOrdinaryUsers(c *gin.Context) {
}
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- reqPb.GroupId = req.GroupId
- reqPb.UserId = req.UserId
+ reqPb.GroupID = req.GroupId
+ reqPb.UserID = req.UserId
reqPb.RoleLevel = constant.GroupOrdinaryUsers
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -559,11 +385,10 @@ func AlterGroupInfo(c *gin.Context) {
Introduction: req.Introduction,
Notification: req.Notification,
FaceURL: req.ProfilePhoto,
- // GroupType: int32(req.GroupType),
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/cms_api/message_cms/message.go b/internal/cms_api/message_cms/message.go
index bd5949771..6cfda0ebc 100644
--- a/internal/cms_api/message_cms/message.go
+++ b/internal/cms_api/message_cms/message.go
@@ -23,9 +23,9 @@ func BroadcastMessage(c *gin.Context) {
reqPb pbMessage.BoradcastMessageReq
)
reqPb.OperationID = utils.OperationIDGenerator()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -45,9 +45,9 @@ func MassSendMassage(c *gin.Context) {
reqPb pbMessage.MassSendMessageReq
)
reqPb.OperationID = utils.OperationIDGenerator()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -67,9 +67,9 @@ func WithdrawMessage(c *gin.Context) {
reqPb pbMessage.WithdrawMessageReq
)
reqPb.OperationID = utils.OperationIDGenerator()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -101,9 +101,9 @@ func GetChatLogs(c *gin.Context) {
}
utils.CopyStructFields(&reqPb, &req)
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMessageCMSName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/cms_api/router.go b/internal/cms_api/router.go
index a0221d536..b21e4a2a0 100644
--- a/internal/cms_api/router.go
+++ b/internal/cms_api/router.go
@@ -20,6 +20,10 @@ func NewGinRouter() *gin.Engine {
adminRouterGroup := router.Group("/admin")
{
adminRouterGroup.POST("/login", admin.AdminLogin)
+ adminRouterGroup.Use(middleware.JWTAuth())
+ adminRouterGroup.POST("/add_user_register_add_friend_id", admin.AddUserRegisterAddFriendIDList)
+ adminRouterGroup.POST("/reduce_user_register_reduce_friend_id", admin.ReduceUserRegisterAddFriendIDList)
+ adminRouterGroup.POST("/get_user_register_reduce_friend_id_list", admin.GetUserRegisterAddFriendIDList)
}
r2 := router.Group("")
r2.Use(middleware.JWTAuth())
@@ -47,20 +51,15 @@ func NewGinRouter() *gin.Engine {
}
groupRouterGroup := r2.Group("/group")
{
- groupRouterGroup.GET("/get_group_by_id", group.GetGroupById)
+ groupRouterGroup.GET("/get_group_by_id", group.GetGroupByID)
groupRouterGroup.GET("/get_groups", group.GetGroups)
groupRouterGroup.GET("/get_group_by_name", group.GetGroupByName)
groupRouterGroup.GET("/get_group_members", group.GetGroupMembers)
groupRouterGroup.POST("/create_group", group.CreateGroup)
groupRouterGroup.POST("/add_members", group.AddGroupMembers)
groupRouterGroup.POST("/remove_members", group.RemoveGroupMembers)
- groupRouterGroup.POST("/ban_group_private_chat", group.BanPrivateChat)
- groupRouterGroup.POST("/open_group_private_chat", group.OpenPrivateChat)
- groupRouterGroup.POST("/ban_group_chat", group.BanGroupChat)
- groupRouterGroup.POST("/open_group_chat", group.OpenGroupChat)
- groupRouterGroup.POST("/delete_group", group.DeleteGroup)
groupRouterGroup.POST("/get_members_in_group", group.GetGroupMembers)
- groupRouterGroup.POST("/set_group_master", group.SetGroupMaster)
+ groupRouterGroup.POST("/set_group_master", group.SetGroupOwner)
groupRouterGroup.POST("/set_group_ordinary_user", group.SetGroupOrdinaryUsers)
groupRouterGroup.POST("/alter_group_info", group.AlterGroupInfo)
}
@@ -78,12 +77,6 @@ func NewGinRouter() *gin.Engine {
userRouterGroup.POST("/delete_user", user.DeleteUser)
userRouterGroup.GET("/get_users_by_name", user.GetUsersByName)
}
- friendRouterGroup := r2.Group("/friend")
- {
- friendRouterGroup.POST("/get_friends_by_id")
- friendRouterGroup.POST("/set_friend")
- friendRouterGroup.POST("/remove_friend")
- }
messageCMSRouterGroup := r2.Group("/message")
{
messageCMSRouterGroup.GET("/get_chat_logs", messageCMS.GetChatLogs)
diff --git a/internal/cms_api/statistics/statistics.go b/internal/cms_api/statistics/statistics.go
index b33bdee12..4afdf5673 100644
--- a/internal/cms_api/statistics/statistics.go
+++ b/internal/cms_api/statistics/statistics.go
@@ -31,9 +31,9 @@ func GetMessagesStatistics(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -85,9 +85,9 @@ func GetUserStatistics(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -149,9 +149,9 @@ func GetGroupStatistics(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -206,9 +206,9 @@ func GetActiveUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.StatisticsReq, req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -240,9 +240,9 @@ func GetActiveGroup(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.StatisticsReq, req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/cms_api/user/user.go b/internal/cms_api/user/user.go
index 09513a98e..f6d2071ad 100644
--- a/internal/cms_api/user/user.go
+++ b/internal/cms_api/user/user.go
@@ -32,9 +32,9 @@ func GetUserById(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -74,9 +74,9 @@ func GetUsersByName(c *gin.Context) {
PageNumber: int32(req.PageNumber),
ShowNumber: int32(req.ShowNumber),
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -111,9 +111,9 @@ func GetUsers(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.Pagination, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -147,9 +147,9 @@ func ResignUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -177,9 +177,9 @@ func AlterUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -206,7 +206,7 @@ func AddUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
log.NewError(reqPb.OperationID, errMsg)
@@ -237,9 +237,9 @@ func BlockUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -268,9 +268,9 @@ func UnblockUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb, &req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -302,9 +302,9 @@ func GetBlockUsers(c *gin.Context) {
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
utils.CopyStructFields(&reqPb.Pagination, &req)
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "blockUsers", reqPb.Pagination, req)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -323,6 +323,10 @@ func GetBlockUsers(c *gin.Context) {
ProfilePhoto: v.User.ProfilePhoto,
Nickname: v.User.Nickname,
IsBlock: v.User.IsBlock,
+ Birth: v.User.Birth,
+ PhoneNumber: v.User.PhoneNumber,
+ Email: v.User.Email,
+ Gender: int(v.User.Gender),
CreateTime: v.User.CreateTime,
},
BeginDisableTime: v.BeginDisableTime,
@@ -350,9 +354,9 @@ func GetBlockUserById(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
reqPb.UserId = req.UserId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
@@ -384,9 +388,9 @@ func DeleteUser(c *gin.Context) {
reqPb.OperationID = utils.OperationIDGenerator()
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
reqPb.UserId = req.UserId
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
if etcdConn == nil {
- errMsg := reqPb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(reqPb.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
diff --git a/internal/cron_task/clear_msg.go b/internal/cron_task/clear_msg.go
new file mode 100644
index 000000000..078eee136
--- /dev/null
+++ b/internal/cron_task/clear_msg.go
@@ -0,0 +1,164 @@
+package cronTask
+
+import (
+ "Open_IM/pkg/common/config"
+ "Open_IM/pkg/common/constant"
+ "Open_IM/pkg/common/db"
+ "Open_IM/pkg/common/log"
+ server_api_params "Open_IM/pkg/proto/sdk_ws"
+ "Open_IM/pkg/utils"
+ goRedis "github.com/go-redis/redis/v8"
+ "github.com/golang/protobuf/proto"
+ "math"
+)
+
+const oldestList = 0
+const newestList = -1
+
+func ResetUserGroupMinSeq(operationID, groupID string, userIDList []string) error {
+ var delMsgIDList [][2]interface{}
+ minSeq, err := deleteMongoMsg(operationID, groupID, oldestList, &delMsgIDList)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), groupID, "deleteMongoMsg failed")
+ return utils.Wrap(err, "")
+ }
+ if minSeq == 0 {
+ return nil
+ }
+ log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDList:", delMsgIDList, "minSeq", minSeq)
+ for _, userID := range userIDList {
+ userMinSeq, err := db.DB.GetGroupUserMinSeq(groupID, userID)
+ if err != nil && err != goRedis.Nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupUserMinSeq failed", groupID, userID, err.Error())
+ continue
+ }
+ if userMinSeq > uint64(minSeq) {
+ err = db.DB.SetGroupUserMinSeq(groupID, userID, userMinSeq)
+ } else {
+ err = db.DB.SetGroupUserMinSeq(groupID, userID, uint64(minSeq))
+ }
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID, userID, userMinSeq, minSeq)
+ }
+ }
+ return nil
+}
+
+func DeleteMongoMsgAndResetRedisSeq(operationID, userID string) error {
+ var delMsgIDList [][2]interface{}
+ minSeq, err := deleteMongoMsg(operationID, userID, oldestList, &delMsgIDList)
+ if err != nil {
+ return utils.Wrap(err, "")
+ }
+ if minSeq == 0 {
+ return nil
+ }
+ log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDMap: ", delMsgIDList, "minSeq", minSeq)
+ err = db.DB.SetUserMinSeq(userID, minSeq)
+ return err
+}
+
+func delMongoMsgs(operationID string, delMsgIDList *[][2]interface{}) error {
+ if len(*delMsgIDList) > 0 {
+ var IDList []string
+ for _, v := range *delMsgIDList {
+ IDList = append(IDList, v[0].(string))
+ }
+ err := db.DB.DelMongoMsgs(IDList)
+ if err != nil {
+ return utils.Wrap(err, "DelMongoMsgs failed")
+ }
+ }
+ return nil
+}
+
+// recursion
+func deleteMongoMsg(operationID string, ID string, index int64, delMsgIDList *[][2]interface{}) (uint32, error) {
+ // 从最旧的列表开始找
+ msgs, err := db.DB.GetUserMsgListByIndex(ID, index)
+ if err != nil || msgs.UID == "" {
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), "GetUserMsgListByIndex failed", err.Error(), index, ID)
+ }
+ return getDelMaxSeqByIDList(*delMsgIDList), delMongoMsgs(operationID, delMsgIDList)
+ }
+ if len(msgs.Msg) > db.GetSingleGocMsgNum() {
+ log.NewWarn(operationID, utils.GetSelfFuncName(), "msgs too large", len(msgs.Msg), msgs.UID)
+ }
+ log.NewDebug(operationID, utils.GetSelfFuncName(), "get msgs: ", msgs.UID)
+ for i, msg := range msgs.Msg {
+ // 找到列表中不需要删除的消息了
+ if utils.GetCurrentTimestampByMill() < msg.SendTime+int64(config.Config.Mongo.DBRetainChatRecords)*24*60*60*1000 {
+ if err := delMongoMsgs(operationID, delMsgIDList); err != nil {
+ return 0, err
+ }
+ minSeq := getDelMaxSeqByIDList(*delMsgIDList)
+ if i > 0 {
+ msgPb := &server_api_params.MsgData{}
+ err = proto.Unmarshal(msg.Msg, msgPb)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), ID, index)
+ } else {
+ err = db.DB.ReplaceMsgToBlankByIndex(msgs.UID, i-1)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), msgs.UID, i)
+ return minSeq, nil
+ }
+ minSeq = msgPb.Seq
+ }
+ }
+ return minSeq, nil
+ }
+ }
+ if len(msgs.Msg) > 0 {
+ msgPb := &server_api_params.MsgData{}
+ err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, msgPb)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), len(msgs.Msg)-1, msgs.UID)
+ return 0, utils.Wrap(err, "proto.Unmarshal failed")
+ }
+ *delMsgIDList = append(*delMsgIDList, [2]interface{}{msgs.UID, msgPb.Seq})
+ }
+ // 没有找到 代表需要全部删除掉 继续递归查找下一个比较旧的列表
+ seq, err := deleteMongoMsg(operationID, utils.GetSelfFuncName(), index+1, delMsgIDList)
+ if err != nil {
+ return 0, utils.Wrap(err, "deleteMongoMsg failed")
+ }
+ return seq, nil
+}
+
+func getDelMaxSeqByIDList(delMsgIDList [][2]interface{}) uint32 {
+ if len(delMsgIDList) == 0 {
+ return 0
+ }
+ return delMsgIDList[len(delMsgIDList)-1][1].(uint32)
+}
+
+func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error {
+ var maxSeq uint64
+ var err error
+ if diffusionType == constant.WriteDiffusion {
+ maxSeq, err = db.DB.GetUserMaxSeq(ID)
+ } else {
+ maxSeq, err = db.DB.GetGroupMaxSeq(ID)
+ }
+ if err != nil {
+ if err == goRedis.Nil {
+ return nil
+ }
+ return utils.Wrap(err, "GetUserMaxSeq failed")
+ }
+ msg, err := db.DB.GetNewestMsg(ID)
+ if err != nil {
+ return utils.Wrap(err, "GetNewestMsg failed")
+ }
+ msgPb := &server_api_params.MsgData{}
+ err = proto.Unmarshal(msg.Msg, msgPb)
+ if err != nil {
+ return utils.Wrap(err, "")
+ }
+ if math.Abs(float64(msgPb.Seq-uint32(maxSeq))) > 10 {
+ log.NewWarn(operationID, utils.GetSelfFuncName(), maxSeq, msgPb.Seq, "redis maxSeq is different with msg.Seq")
+ }
+ return nil
+}
diff --git a/internal/cron_task/cron_task.go b/internal/cron_task/cron_task.go
new file mode 100644
index 000000000..59a06fef1
--- /dev/null
+++ b/internal/cron_task/cron_task.go
@@ -0,0 +1,77 @@
+package cronTask
+
+import (
+ "Open_IM/pkg/common/config"
+ "Open_IM/pkg/common/constant"
+ "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ rocksCache "Open_IM/pkg/common/db/rocks_cache"
+ "Open_IM/pkg/common/log"
+ "Open_IM/pkg/utils"
+ "fmt"
+ "github.com/robfig/cron/v3"
+ "time"
+)
+
+const cronTaskOperationID = "cronTaskOperationID-"
+
+func StartCronTask() {
+ log.NewPrivateLog("cron")
+ log.NewInfo(utils.OperationIDGenerator(), "start cron task")
+ c := cron.New()
+ fmt.Println("config", config.Config.Mongo.ChatRecordsClearTime)
+ _, err := c.AddFunc(config.Config.Mongo.ChatRecordsClearTime, func() {
+ operationID := getCronTaskOperationID()
+ log.NewInfo(operationID, "====================== start del cron task ======================")
+ userIDList, err := im_mysql_model.SelectAllUserID()
+ if err == nil {
+ log.NewDebug(operationID, utils.GetSelfFuncName(), "userIDList: ", userIDList)
+ for _, userID := range userIDList {
+ if err := DeleteMongoMsgAndResetRedisSeq(operationID, userID); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), userID)
+ }
+ if err := checkMaxSeqWithMongo(operationID, userID, constant.WriteDiffusion); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), userID, err)
+ }
+ }
+ } else {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
+ }
+
+ workingGroupIDList, err := im_mysql_model.GetGroupIDListByGroupType(constant.WorkingGroup)
+ if err == nil {
+ for _, groupID := range workingGroupIDList {
+ userIDList, err = rocksCache.GetGroupMemberIDListFromCache(groupID)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID)
+ continue
+ }
+ log.NewDebug(operationID, utils.GetSelfFuncName(), "groupID:", groupID, "userIDList:", userIDList)
+ if err := ResetUserGroupMinSeq(operationID, groupID, userIDList); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID, userIDList)
+ }
+ if err := checkMaxSeqWithMongo(operationID, groupID, constant.ReadDiffusion); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), groupID, err)
+ }
+ }
+ } else {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
+ return
+ }
+
+ log.NewInfo(operationID, "====================== start del cron finished ======================")
+ })
+ if err != nil {
+ fmt.Println("start cron failed", err.Error())
+ panic(err)
+ }
+
+ c.Start()
+ fmt.Println("start cron task success")
+ for {
+ time.Sleep(time.Second)
+ }
+}
+
+func getCronTaskOperationID() string {
+ return cronTaskOperationID + utils.OperationIDGenerator()
+}
diff --git a/internal/cron_task/test/main.go b/internal/cron_task/test/main.go
new file mode 100644
index 000000000..d32f27739
--- /dev/null
+++ b/internal/cron_task/test/main.go
@@ -0,0 +1,7 @@
+package main
+
+import "Open_IM/pkg/common/db"
+
+func main() {
+ db.DB.BatchInsertChat()
+}
diff --git a/internal/demo/register/invitation_code.go b/internal/demo/register/invitation_code.go
new file mode 100644
index 000000000..c74fc1d30
--- /dev/null
+++ b/internal/demo/register/invitation_code.go
@@ -0,0 +1,120 @@
+package register
+
+import (
+ apiStruct "Open_IM/pkg/base_info"
+ "Open_IM/pkg/common/constant"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ "Open_IM/pkg/common/log"
+ "Open_IM/pkg/utils"
+ "github.com/gin-gonic/gin"
+ "net/http"
+ "time"
+)
+
+type InvitationCode struct {
+ InvitationCode string `json:"invitationCode"`
+ CreateTime time.Time `json:"createTime"`
+ UserID string `json:"userID"`
+ LastTime time.Time `json:"lastTime"`
+ Status int32 `json:"status"`
+}
+
+type GenerateInvitationCodeReq struct {
+ CodesNum int `json:"codesNum" binding:"required"`
+ CodeLen int `json:"codeLen" binding:"required"`
+ OperationID string `json:"operationID" binding:"required"`
+}
+
+type GenerateInvitationCodeResp struct {
+ Codes []string `json:"codes"`
+}
+
+func GenerateInvitationCode(c *gin.Context) {
+ req := GenerateInvitationCodeReq{}
+ resp := GenerateInvitationCodeResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ var err error
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ resp.Codes, err = imdb.BatchCreateInvitationCodes(req.CodesNum, req.CodeLen)
+ if err != nil {
+ log.NewError(req.OperationID, "BatchCreateInvitationCodes failed", req.CodesNum, req.CodeLen)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
+ return
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+}
+
+type QueryInvitationCodeReq struct {
+ Code string `json:"code" binding:"required"`
+ OperationID string `json:"operationID" binding:"required"`
+}
+
+type QueryInvitationCodeResp struct {
+ InvitationCode
+}
+
+func QueryInvitationCode(c *gin.Context) {
+ req := QueryInvitationCodeReq{}
+ resp := QueryInvitationCodeResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ invitation, err := imdb.GetInvitationCode(req.Code)
+ if err != nil {
+ log.NewError(req.OperationID, "GetInvitationCode failed", req.Code)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
+ return
+ }
+ resp.UserID = invitation.UserID
+ resp.CreateTime = invitation.CreateTime
+ resp.Status = invitation.Status
+ resp.LastTime = invitation.LastTime
+ resp.InvitationCode.InvitationCode = invitation.InvitationCode
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+}
+
+type GetInvitationCodesReq struct {
+ Status int32 `json:"status"`
+ OperationID string `json:"operationID" binding:"required"`
+ apiStruct.Pagination
+}
+
+type GetInvitationCodesResp struct {
+ apiStruct.Pagination
+ Codes []InvitationCode `json:"codes"`
+}
+
+func GetInvitationCodes(c *gin.Context) {
+ req := GetInvitationCodesReq{}
+ resp := GetInvitationCodesResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ codes, err := imdb.GetInvitationCodes(req.ShowNumber, req.PageNumber, req.Status)
+ if err != nil {
+ log.NewError(req.OperationID, "GetInvitationCode failed", req.ShowNumber, req.PageNumber, req.Status)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
+ return
+ }
+ resp.Pagination.PageNumber = req.PageNumber
+ resp.Pagination.ShowNumber = req.ShowNumber
+ for _, v := range codes {
+ resp.Codes = append(resp.Codes, InvitationCode{
+ InvitationCode: v.InvitationCode,
+ CreateTime: v.CreateTime,
+ UserID: v.UserID,
+ LastTime: v.LastTime,
+ Status: v.Status,
+ })
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+}
diff --git a/internal/demo/register/ip_limit.go b/internal/demo/register/ip_limit.go
new file mode 100644
index 000000000..17a53795d
--- /dev/null
+++ b/internal/demo/register/ip_limit.go
@@ -0,0 +1,223 @@
+package register
+
+import (
+ //api "Open_IM/pkg/base_info"
+ "Open_IM/pkg/common/constant"
+ "Open_IM/pkg/common/db"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ "Open_IM/pkg/common/log"
+ "Open_IM/pkg/utils"
+ "github.com/gin-gonic/gin"
+ //"github.com/jinzhu/gorm"
+ "net/http"
+ "time"
+)
+
+type QueryIPRegisterReq struct {
+ OperationID string `json:"operationID"`
+ IP string `json:"ip"`
+}
+
+type QueryIPRegisterResp struct {
+ IP string `json:"ip"`
+ RegisterNum int `json:"num"`
+ Status int `json:"status"`
+ UserIDList []string `json:"userIDList"`
+}
+
+func QueryIPRegister(c *gin.Context) {
+ req := QueryIPRegisterReq{}
+ resp := QueryIPRegisterResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ userIDList, err := imdb.GetRegisterUserNum(req.IP)
+ if err != nil {
+ log.NewError(req.OperationID, "GetInvitationCode failed", req.IP)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetRegisterUserNum error!"})
+ return
+ }
+ resp.IP = req.IP
+ resp.RegisterNum = len(userIDList)
+ resp.UserIDList = userIDList
+ ipLimit, err := imdb.QueryIPLimits(req.IP)
+ if err != nil {
+ log.NewError(req.OperationID, "QueryIPLimits failed", req.IP, err.Error())
+ } else {
+ if ipLimit != nil {
+ if ipLimit.Ip != "" {
+ resp.Status = 1
+ }
+ }
+
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+}
+
+type AddIPLimitReq struct {
+ OperationID string `json:"operationID"`
+ IP string `json:"ip"`
+ LimitTime int32 `json:"limitTime"`
+}
+
+type AddIPLimitResp struct {
+}
+
+func AddIPLimit(c *gin.Context) {
+ req := AddIPLimitReq{}
+ //resp := AddIPLimitResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ if err := imdb.InsertOneIntoIpLimits(db.IpLimit{
+ Ip: req.IP,
+ LimitRegister: 1,
+ LimitLogin: 1,
+ CreateTime: time.Now(),
+ LimitTime: utils.UnixSecondToTime(int64(req.LimitTime)),
+ }); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.IP, req.LimitTime)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "InsertOneIntoIpLimits error!"})
+ return
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
+}
+
+type RemoveIPLimitReq struct {
+ OperationID string `json:"operationID"`
+ IP string `json:"ip"`
+}
+
+type RemoveIPLimitResp struct {
+}
+
+func RemoveIPLimit(c *gin.Context) {
+ req := RemoveIPLimitReq{}
+ //resp := AddIPLimitResp{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.ErrArgs, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ if err := imdb.DeleteOneFromIpLimits(req.IP); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.IP)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "InsertOneIntoIpLimits error!"})
+ return
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
+}
+
+// ===========================================sk ==========================
+
+type QueryUserIDIPLimitLoginReq struct {
+ UserID string `json:"userID" binding:"required"`
+ OperationID string `json:"operationID" binding:"required"`
+}
+
+//type QueryUserIDIPLimitLoginResp struct {
+// UserIpLimit []db.UserIpLimit `json:"userIpLimit"`
+//}
+
+func QueryUserIDLimitLogin(c *gin.Context) {
+ req := QueryUserIDIPLimitLoginReq{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ resp, err := imdb.GetIpLimitsLoginByUserID(req.UserID)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetIpLimitsByUserID error!"})
+ return
+ }
+ if len(resp) > 0 {
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+ return
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
+}
+
+type AddUserIPLimitLoginReq struct {
+ UserID string `json:"userID" binding:"required"`
+ OperationID string `json:"operationID" binding:"required"`
+ IP string `json:"ip"`
+}
+
+type AddUserIPLimitLoginResp struct {
+}
+
+// 添加ip 特定用户才能登录 user_ip_limits 表
+func AddUserIPLimitLogin(c *gin.Context) {
+ req := AddUserIPLimitLoginReq{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ userIp := db.UserIpLimit{UserID: req.UserID, Ip: req.IP}
+ err := imdb.UpdateUserInfo(db.User{
+ UserID: req.UserID,
+ LoginLimit: 1,
+ })
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "InsertUserIpLimitsLogin error!"})
+ return
+ }
+ err = imdb.InsertUserIpLimitsLogin(&userIp)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "InsertUserIpLimitsLogin error!"})
+ return
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
+}
+
+type RemoveUserIPLimitReq struct {
+ UserID string `json:"userID" binding:"required"`
+ OperationID string `json:"operationID" binding:"required"`
+ IP string `json:"ip"`
+}
+
+type RemoveUserIPLimitResp struct {
+}
+
+// 删除ip 特定用户才能登录 user_ip_limits 表
+func RemoveUserIPLimitLogin(c *gin.Context) {
+ req := RemoveUserIPLimitReq{}
+ if err := c.BindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
+ return
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
+ err := imdb.DeleteUserIpLimitsLogin(req.UserID, req.IP)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "DeleteUserIpLimitsLogin error!"})
+ return
+ }
+ ips, err := imdb.GetIpLimitsLoginByUserID(req.UserID)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "GetIpLimitsLoginByUserID error!"})
+ return
+ }
+ if len(ips) == 0 {
+ err := imdb.UpdateUserInfoByMap(db.User{
+ UserID: req.UserID,
+ }, map[string]interface{}{"login_limit": 0})
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
+ c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "UpdateUserInfo error!"})
+ return
+ }
+ }
+ c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
+}
diff --git a/internal/demo/register/login.go b/internal/demo/register/login.go
index 28852a83d..89c1a770b 100644
--- a/internal/demo/register/login.go
+++ b/internal/demo/register/login.go
@@ -10,8 +10,9 @@ import (
"Open_IM/pkg/utils"
"encoding/json"
"fmt"
- "github.com/gin-gonic/gin"
"net/http"
+
+ "github.com/gin-gonic/gin"
)
type ParamsLogin struct {
@@ -56,12 +57,22 @@ func Login(c *gin.Context) {
} else {
userID = r.Account
}
+ ip := c.Request.Header.Get("X-Forward-For")
+ if ip == "" {
+ ip = c.ClientIP()
+ }
url := fmt.Sprintf("http://%s:%d/auth/user_token", utils.ServerIP, config.Config.Api.GinPort[0])
openIMGetUserToken := api.UserTokenReq{}
openIMGetUserToken.OperationID = params.OperationID
openIMGetUserToken.Platform = params.Platform
openIMGetUserToken.Secret = config.Config.Secret
openIMGetUserToken.UserID = userID
+ openIMGetUserToken.LoginIp = ip
+ loginIp := c.Request.Header.Get("X-Forward-For")
+ if loginIp == "" {
+ loginIp = c.ClientIP()
+ }
+ openIMGetUserToken.LoginIp = loginIp
openIMGetUserTokenResp := api.UserTokenResp{}
bMsg, err := http2.Post(url, openIMGetUserToken, 2)
if err != nil {
@@ -72,7 +83,11 @@ func Login(c *gin.Context) {
err = json.Unmarshal(bMsg, &openIMGetUserTokenResp)
if err != nil || openIMGetUserTokenResp.ErrCode != 0 {
log.NewError(params.OperationID, "request get user token", account, "err", "")
- c.JSON(http.StatusOK, gin.H{"errCode": constant.GetIMTokenErr, "errMsg": ""})
+ if openIMGetUserTokenResp.ErrCode == constant.LoginLimit {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.LoginLimit, "errMsg": "用户登录被限制"})
+ } else {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.GetIMTokenErr, "errMsg": ""})
+ }
return
}
c.JSON(http.StatusOK, gin.H{"errCode": constant.NoError, "errMsg": "", "data": openIMGetUserTokenResp.UserToken})
diff --git a/internal/demo/register/onboarding_process.go b/internal/demo/register/onboarding_process.go
index c87074ad9..bac5a244c 100644
--- a/internal/demo/register/onboarding_process.go
+++ b/internal/demo/register/onboarding_process.go
@@ -9,6 +9,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
groupRpc "Open_IM/pkg/proto/group"
+
organizationRpc "Open_IM/pkg/proto/organization"
commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
@@ -50,23 +51,38 @@ func onboardingProcess(operationID, userID, userName, faceURL, phoneNumber, emai
if err := createOrganizationUser(operationID, userID, userName, phoneNumber, email); err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), "createOrganizationUser failed", err.Error())
}
- departmentID, err := imdb.GetRandomDepartmentID()
+ var joinDepartmentIDList []string
+ if len(config.Config.Demo.JoinDepartmentIDList) == 0 {
+ departmentID, err := imdb.GetRandomDepartmentID()
+ if err != nil {
+ log.NewError(utils.GetSelfFuncName(), "GetRandomDepartmentID failed", err.Error())
+ return
+ }
+ joinDepartmentIDList = []string{departmentID}
+ } else {
+ joinDepartmentIDList = config.Config.Demo.JoinDepartmentIDList
+ }
- if err := joinTestDepartment(operationID, userID, departmentID); err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), "joinTestDepartment failed", err.Error())
+ for _, departmentID := range joinDepartmentIDList {
+ if err := joinTestDepartment(operationID, userID, departmentID); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), "joinTestDepartment failed", err.Error())
+ }
}
- log.NewInfo(operationID, utils.GetSelfFuncName(), "random departmentID", departmentID)
- if err != nil {
- log.NewError(utils.GetSelfFuncName(), "GetRandomDepartmentID failed", err.Error())
- return
+
+ if config.Config.Demo.JoinDepartmentGroups {
+ for _, departmentID := range joinDepartmentIDList {
+ groupIDList, err := GetDepartmentGroupIDList(operationID, departmentID)
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
+ }
+ joinGroups(operationID, userID, userName, faceURL, groupIDList)
+ log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
+ }
}
- groupIDList, err := GetDepartmentGroupIDList(operationID, departmentID)
- if err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
+
+ if config.Config.Demo.OaNotification {
+ oaNotification(operationID, userID)
}
- joinGroups(operationID, userID, userName, faceURL, groupIDList)
- log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
- oaNotification(operationID, userID)
}
func createOrganizationUser(operationID, userID, userName, phoneNumber, email string) error {
@@ -74,9 +90,9 @@ func createOrganizationUser(operationID, userID, userName, phoneNumber, email st
log.NewInfo(operationID, utils.GetSelfFuncName(), userID)
}()
log.NewInfo(operationID, utils.GetSelfFuncName(), "start createOrganizationUser")
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
if etcdConn == nil {
- errMsg := operationID + "getcdv3.GetConn == nil"
+ errMsg := operationID + "getcdv3.GetDefaultConn == nil"
log.NewError(operationID, errMsg)
return errors.New(errMsg)
}
@@ -113,9 +129,9 @@ func joinTestDepartment(operationID, userID, departmentID string) error {
defer func() {
log.NewInfo(operationID, utils.GetSelfFuncName(), userID)
}()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
if etcdConn == nil {
- errMsg := operationID + "getcdv3.GetConn == nil"
+ errMsg := operationID + "getcdv3.GetDefaultConn == nil"
log.NewError(operationID, errMsg)
return errors.New(errMsg)
}
@@ -145,9 +161,9 @@ func GetDepartmentGroupIDList(operationID, departmentID string) ([]string, error
defer func() {
log.NewInfo(operationID, utils.GetSelfFuncName(), departmentID)
}()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, operationID)
if etcdConn == nil {
- errMsg := operationID + "getcdv3.GetConn == nil"
+ errMsg := operationID + "getcdv3.GetDefaultConn == nil"
log.NewError(operationID, errMsg)
return nil, errors.New(errMsg)
}
@@ -184,9 +200,9 @@ func joinGroups(operationID, userID, userName, faceURL string, groupIDList []str
defer func() {
log.NewInfo(operationID, utils.GetSelfFuncName(), userID, groupIDList)
}()
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, operationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, operationID)
if etcdConn == nil {
- errMsg := operationID + "getcdv3.GetConn == nil"
+ errMsg := operationID + "getcdv3.GetDefaultConn == nil"
log.NewError(operationID, errMsg)
return
}
diff --git a/internal/demo/register/register_import_friend.go b/internal/demo/register/register_import_friend.go
new file mode 100644
index 000000000..8475ec78c
--- /dev/null
+++ b/internal/demo/register/register_import_friend.go
@@ -0,0 +1,52 @@
+package register
+
+import (
+ "Open_IM/pkg/common/config"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ "Open_IM/pkg/common/log"
+ "Open_IM/pkg/grpc-etcdv3/getcdv3"
+ pbFriend "Open_IM/pkg/proto/friend"
+ "Open_IM/pkg/utils"
+ "context"
+ "strings"
+)
+
+var ChImportFriend chan *pbFriend.ImportFriendReq
+
+func init() {
+ ChImportFriend = make(chan *pbFriend.ImportFriendReq, 1000)
+}
+
+func ImportFriendRoutine() {
+ for {
+ req := <-ChImportFriend
+ go func() {
+ friendUserIDList, err := imdb.GetRegisterAddFriendList(0, 0)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req, err.Error())
+ return
+ }
+ log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "ImportFriendRoutine IDList", friendUserIDList)
+ if len(friendUserIDList) == 0 {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "len==0")
+ return
+ }
+ req.FriendUserIDList = friendUserIDList
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
+ if etcdConn == nil {
+ errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ log.NewError(req.OperationID, errMsg)
+ return
+ }
+ client := pbFriend.NewFriendClient(etcdConn)
+ rpcResp, err := client.ImportFriend(context.Background(), req)
+ if err != nil {
+ log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String())
+ return
+ }
+ if rpcResp.CommonResp.ErrCode != 0 {
+ log.NewError(req.OperationID, "ImportFriend failed ", rpcResp)
+ }
+ }()
+ }
+}
diff --git a/internal/demo/register/send_code.go b/internal/demo/register/send_code.go
index cd67c0c04..a0e6f9c76 100644
--- a/internal/demo/register/send_code.go
+++ b/internal/demo/register/send_code.go
@@ -8,12 +8,12 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/utils"
"fmt"
- "github.com/gin-gonic/gin"
- "gopkg.in/gomail.v2"
"math/rand"
"net/http"
-
"time"
+
+ "github.com/gin-gonic/gin"
+ "gopkg.in/gomail.v2"
)
var sms SMS
@@ -34,11 +34,12 @@ func init() {
}
type paramsVerificationCode struct {
- Email string `json:"email"`
- PhoneNumber string `json:"phoneNumber"`
- OperationID string `json:"operationID" binding:"required"`
- UsedFor int `json:"usedFor"`
- AreaCode string `json:"areaCode"`
+ Email string `json:"email"`
+ PhoneNumber string `json:"phoneNumber"`
+ OperationID string `json:"operationID" binding:"required"`
+ UsedFor int `json:"usedFor"`
+ AreaCode string `json:"areaCode"`
+ InvitationCode string `json:"invitationCode"`
}
func SendVerificationCode(c *gin.Context) {
@@ -72,6 +73,15 @@ func SendVerificationCode(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"errCode": constant.HasRegistered, "errMsg": "The phone number has been registered"})
return
}
+ //需要邀请码
+ if config.Config.Demo.NeedInvitationCode {
+ err = im_mysql_model.CheckInvitationCode(params.InvitationCode)
+ if err != nil {
+ log.NewError(params.OperationID, "邀请码错误", params)
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
+ return
+ }
+ }
accountKey = accountKey + "_" + constant.VerificationCodeForRegisterSuffix
ok, err := db.DB.JudgeAccountEXISTS(accountKey)
if ok || err != nil {
diff --git a/internal/demo/register/set_password.go b/internal/demo/register/set_password.go
index 89e746aaf..5b7deae4f 100644
--- a/internal/demo/register/set_password.go
+++ b/internal/demo/register/set_password.go
@@ -5,16 +5,18 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
- "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
http2 "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
+ pbFriend "Open_IM/pkg/proto/friend"
"Open_IM/pkg/utils"
"encoding/json"
- "github.com/gin-gonic/gin"
"math/big"
"net/http"
"strconv"
"time"
+
+ "github.com/gin-gonic/gin"
)
type ParamsSetPassword struct {
@@ -29,6 +31,7 @@ type ParamsSetPassword struct {
FaceURL string `json:"faceURL"`
OperationID string `json:"operationID" binding:"required"`
AreaCode string `json:"areaCode"`
+ InvitationCode string `json:"invitationCode"`
}
func SetPassword(c *gin.Context) {
@@ -38,6 +41,23 @@ func SetPassword(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
+
+ ip := c.Request.Header.Get("X-Forward-For")
+ if ip == "" {
+ ip = c.ClientIP()
+ }
+ log.NewDebug(params.OperationID, utils.GetSelfFuncName(), "ip:", ip)
+ Limited, LimitError := imdb.IsLimitRegisterIp(ip)
+ if LimitError != nil {
+ log.Error(params.OperationID, utils.GetSelfFuncName(), LimitError, ip)
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": LimitError.Error()})
+ return
+ }
+ if Limited {
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.RegisterLimit, "errMsg": "limited"})
+ return
+ }
+
var account string
if params.Email != "" {
account = params.Email
@@ -61,6 +81,13 @@ func SetPassword(c *gin.Context) {
return
}
}
+ if config.Config.Demo.NeedInvitationCode && params.InvitationCode != "" {
+ err := imdb.CheckInvitationCode(params.InvitationCode)
+ if err != nil {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
+ return
+ }
+ }
}
//userID := utils.Base64Encode(account)
var userID string
@@ -81,6 +108,9 @@ func SetPassword(c *gin.Context) {
openIMRegisterReq.Nickname = params.Nickname
openIMRegisterReq.Secret = config.Config.Secret
openIMRegisterReq.FaceURL = params.FaceURL
+ openIMRegisterReq.CreateIp = ip
+ openIMRegisterReq.LastLoginIp = ip
+ openIMRegisterReq.InvitationCode = params.InvitationCode
openIMRegisterResp := api.UserRegisterResp{}
log.NewDebug(params.OperationID, utils.GetSelfFuncName(), "register req:", openIMRegisterReq)
bMsg, err := http2.Post(url, openIMRegisterReq, 2)
@@ -95,19 +125,35 @@ func SetPassword(c *gin.Context) {
if err != nil {
log.NewError(params.OperationID, utils.GetSelfFuncName(), err.Error())
}
- c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterFailed, "errMsg": "register failed: " + openIMRegisterResp.ErrMsg})
- return
+ if openIMRegisterResp.ErrCode == constant.RegisterLimit {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
+ return
+ } else if openIMRegisterResp.ErrCode == constant.InvitationError {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
+ return
+ } else {
+ c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterFailed, "errMsg": "register failed: " + openIMRegisterResp.ErrMsg})
+ return
+ }
}
log.Info(params.OperationID, "begin store mysql", account, params.Password, "info", params.FaceURL, params.Nickname)
- err = im_mysql_model.SetPassword(account, params.Password, params.Ex, userID, params.AreaCode)
+ err = imdb.SetPassword(account, params.Password, params.Ex, userID, params.AreaCode, ip)
if err != nil {
log.NewError(params.OperationID, "set phone number password error", account, "err", err.Error())
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterFailed, "errMsg": err.Error()})
return
}
+ if config.Config.Demo.NeedInvitationCode && params.InvitationCode != "" {
+ //判断一下验证码的使用情况
+ LockSucc := imdb.TryLockInvitationCode(params.InvitationCode, userID)
+ if LockSucc {
+ imdb.FinishInvitationCode(params.InvitationCode, userID)
+ }
+ }
+
log.Info(params.OperationID, "end setPassword", account, params.Password)
// demo onboarding
- if params.UserID == "" {
+ if params.UserID == "" && config.Config.Demo.OnboardProcess {
select {
case Ch <- OnboardingProcessReq{
OperationID: params.OperationID,
@@ -121,6 +167,17 @@ func SetPassword(c *gin.Context) {
log.NewWarn(params.OperationID, utils.GetSelfFuncName(), "to ch timeOut")
}
}
+
+ select {
+ case ChImportFriend <- &pbFriend.ImportFriendReq{
+ OperationID: params.OperationID,
+ FromUserID: userID,
+ OpUserID: config.Config.Manager.AppManagerUid[0],
+ }:
+ case <-time.After(time.Second * 2):
+ log.NewWarn(params.OperationID, utils.GetSelfFuncName(), "to ChImportFriend timeOut")
+ }
+
c.JSON(http.StatusOK, gin.H{"errCode": constant.NoError, "errMsg": "", "data": openIMRegisterResp.UserToken})
return
}
diff --git a/internal/msg_gateway/gate/batch_push.go b/internal/msg_gateway/gate/batch_push.go
index d0154c260..4ea7b5658 100644
--- a/internal/msg_gateway/gate/batch_push.go
+++ b/internal/msg_gateway/gate/batch_push.go
@@ -89,9 +89,9 @@ func (r *RPCServer) GetSingleUserMsg(operationID string, currentMsgSeq uint32, u
rpcReq.SeqList = seqList
rpcReq.UserID = userID
rpcReq.OperationID = operationID
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
if grpcConn == nil {
- errMsg := "getcdv3.GetConn == nil"
+ errMsg := "getcdv3.GetDefaultConn == nil"
log.NewError(rpcReq.OperationID, errMsg)
return nil
}
diff --git a/internal/msg_gateway/gate/callback.go b/internal/msg_gateway/gate/callback.go
index 9df9c6373..e0498f615 100644
--- a/internal/msg_gateway/gate/callback.go
+++ b/internal/msg_gateway/gate/callback.go
@@ -59,3 +59,28 @@ func callbackUserOffline(operationID, userID string, platformID int) cbApi.Commo
}
return callbackResp
}
+
+func callbackUserKickOff(operationID string, userID string, platformID int) cbApi.CommonCallbackResp {
+ callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
+ if !config.Config.Callback.CallbackUserKickOff.Enable {
+ return callbackResp
+ }
+ callbackUserKickOffReq := cbApi.CallbackUserKickOffReq{
+ UserStatusCallbackReq: cbApi.UserStatusCallbackReq{
+ UserStatusBaseCallback: cbApi.UserStatusBaseCallback{
+ CallbackCommand: constant.CallbackUserKickOffCommand,
+ OperationID: operationID,
+ PlatformID: int32(platformID),
+ Platform: constant.PlatformIDToName(platformID),
+ },
+ UserID: userID,
+ },
+ Seq: int(time.Now().UnixNano() / 1e6),
+ }
+ callbackUserKickOffResp := &cbApi.CallbackUserKickOffResp{CommonCallbackResp: callbackResp}
+ if err := http.PostReturn(config.Config.Callback.CallbackUrl, callbackUserKickOffReq, callbackUserKickOffResp, config.Config.Callback.CallbackUserOffline.CallbackTimeOut); err != nil {
+ callbackResp.ErrCode = http2.StatusInternalServerError
+ callbackResp.ErrMsg = err.Error()
+ }
+ return callbackResp
+}
diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go
index b9d132cd1..a6f3a1974 100644
--- a/internal/msg_gateway/gate/logic.go
+++ b/internal/msg_gateway/gate/logic.go
@@ -72,9 +72,9 @@ func (ws *WServer) getSeqReq(conn *UserConn, m *Req) {
rpcReq.UserID = m.SendID
rpcReq.OperationID = m.OperationID
log.Debug(m.OperationID, "Ws call success to getMaxAndMinSeq", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.GetMaxAndMinSeqReq).GroupIDList)
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
if grpcConn == nil {
- errMsg := rpcReq.OperationID + "getcdv3.GetConn == nil"
+ errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil"
nReply.ErrCode = 500
nReply.ErrMsg = errMsg
log.NewError(rpcReq.OperationID, errMsg)
@@ -127,9 +127,9 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) {
rpcReq.OperationID = m.OperationID
rpcReq.GroupSeqList = data.(sdk_ws.PullMessageBySeqListReq).GroupSeqList
log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList)
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
if grpcConn == nil {
- errMsg := rpcReq.OperationID + "getcdv3.GetConn == nil"
+ errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil"
nReply.ErrCode = 500
nReply.ErrMsg = errMsg
log.NewError(rpcReq.OperationID, errMsg)
@@ -186,9 +186,9 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req) {
MsgData: &data,
}
log.NewInfo(m.OperationID, "Ws call success to sendMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, data.String())
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
if etcdConn == nil {
- errMsg := m.OperationID + "getcdv3.GetConn == nil"
+ errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
nReply.ErrCode = 500
nReply.ErrMsg = errMsg
log.NewError(m.OperationID, errMsg)
@@ -237,9 +237,9 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) {
isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendSignalMsg, m.OperationID)
if isPass {
signalResp := pbRtc.SignalResp{}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRealTimeCommName, m.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRealTimeCommName, m.OperationID)
if etcdConn == nil {
- errMsg := m.OperationID + "getcdv3.GetConn == nil"
+ errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(m.OperationID, errMsg)
ws.sendSignalMsgResp(conn, 204, errMsg, m, &signalResp)
return
@@ -267,9 +267,9 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) {
}
log.NewInfo(m.OperationID, utils.GetSelfFuncName(), "pbData: ", pbData)
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, msgData)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
if etcdConn == nil {
- errMsg := m.OperationID + "getcdv3.GetConn == nil"
+ errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(m.OperationID, errMsg)
ws.sendSignalMsgResp(conn, 200, errMsg, m, &signalResp)
return
diff --git a/internal/msg_gateway/gate/relay_rpc_server.go b/internal/msg_gateway/gate/relay_rpc_server.go
index cc64285e6..b00129d64 100644
--- a/internal/msg_gateway/gate/relay_rpc_server.go
+++ b/internal/msg_gateway/gate/relay_rpc_server.go
@@ -291,19 +291,20 @@ func (r *RPCServer) encodeWsData(wsData *sdk_ws.MsgData, operationID string) (by
func (r *RPCServer) KickUserOffline(_ context.Context, req *pbRelay.KickUserOfflineReq) (*pbRelay.KickUserOfflineResp, error) {
log.NewInfo(req.OperationID, "KickUserOffline is arriving", req.String())
for _, v := range req.KickUserIDList {
+ log.NewWarn(req.OperationID, "SetTokenKicked ", v, req.PlatformID, req.OperationID)
+ SetTokenKicked(v, int(req.PlatformID), req.OperationID)
oldConnMap := ws.getUserAllCons(v)
if conn, ok := oldConnMap[int(req.PlatformID)]; ok { // user->map[platform->conn]
log.NewWarn(req.OperationID, "send kick msg, close connection ", req.PlatformID, v)
ws.sendKickMsg(conn, &UserConn{})
conn.Close()
}
- log.NewWarn(req.OperationID, "SetTokenKicked ", v, req.PlatformID, req.OperationID)
- SetTokenKicked(v, int(req.PlatformID), req.OperationID)
}
return &pbRelay.KickUserOfflineResp{}, nil
}
func (r *RPCServer) MultiTerminalLoginCheck(ctx context.Context, req *pbRelay.MultiTerminalLoginCheckReq) (*pbRelay.MultiTerminalLoginCheckResp, error) {
+
ws.MultiTerminalLoginCheckerWithLock(req.UserID, int(req.PlatformID), req.Token, req.OperationID)
return &pbRelay.MultiTerminalLoginCheckResp{}, nil
}
diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go
index 53942155f..29ec4f8ea 100644
--- a/internal/msg_gateway/gate/ws_server.go
+++ b/internal/msg_gateway/gate/ws_server.go
@@ -12,9 +12,10 @@ import (
"bytes"
"context"
"encoding/gob"
+ "strings"
+
go_redis "github.com/go-redis/redis/v8"
"github.com/pkg/errors"
- "strings"
//"gopkg.in/errgo.v2/errors"
"net/http"
@@ -119,18 +120,21 @@ func (ws *WServer) SetWriteTimeoutWriteMsg(conn *UserConn, a int, msg []byte, ti
}
func (ws *WServer) MultiTerminalLoginRemoteChecker(userID string, platformID int32, token string, operationID string) {
- grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
+ log.NewInfo(operationID, utils.GetSelfFuncName(), "args grpcCons: ", userID, platformID, grpcCons)
for _, v := range grpcCons {
if v.Target() == rpcSvr.target {
log.Debug(operationID, "Filter out this node ", rpcSvr.target)
continue
}
+ log.Debug(operationID, "call this node ", v.Target(), rpcSvr.target)
client := pbRelay.NewRelayClient(v)
req := &pbRelay.MultiTerminalLoginCheckReq{OperationID: operationID, PlatformID: platformID, UserID: userID, Token: token}
log.NewInfo(operationID, "MultiTerminalLoginCheckReq ", client, req.String())
resp, err := client.MultiTerminalLoginCheck(context.Background(), req)
if err != nil {
log.Error(operationID, "MultiTerminalLoginCheck failed ", err.Error())
+ continue
}
if resp.ErrCode != 0 {
log.Error(operationID, "MultiTerminalLoginCheck errCode, errMsg: ", resp.ErrCode, resp.ErrMsg)
@@ -141,7 +145,13 @@ func (ws *WServer) MultiTerminalLoginRemoteChecker(userID string, platformID int
func (ws *WServer) MultiTerminalLoginCheckerWithLock(uid string, platformID int, token string, operationID string) {
rwLock.Lock()
defer rwLock.Unlock()
+ log.NewInfo(operationID, utils.GetSelfFuncName(), " rpc args: ", uid, platformID, token)
switch config.Config.MultiLoginPolicy {
+ case constant.PCAndOther:
+ if constant.PlatformNameToClass(constant.PlatformIDToName(platformID)) == constant.TerminalPC {
+ return
+ }
+ fallthrough
case constant.AllLoginButSameTermKick:
if oldConnMap, ok := ws.wsUserToConn[uid]; ok { // user->map[platform->conn]
if oldConn, ok := oldConnMap[platformID]; ok {
@@ -192,11 +202,16 @@ func (ws *WServer) MultiTerminalLoginCheckerWithLock(uid string, platformID int,
func (ws *WServer) MultiTerminalLoginChecker(uid string, platformID int, newConn *UserConn, token string, operationID string) {
switch config.Config.MultiLoginPolicy {
+ case constant.PCAndOther:
+ if constant.PlatformNameToClass(constant.PlatformIDToName(platformID)) == constant.TerminalPC {
+ return
+ }
+ fallthrough
case constant.AllLoginButSameTermKick:
if oldConnMap, ok := ws.wsUserToConn[uid]; ok { // user->map[platform->conn]
if oldConn, ok := oldConnMap[platformID]; ok {
log.NewDebug(operationID, uid, platformID, "kick old conn")
- // ws.sendKickMsg(oldConn, newConn)
+ ws.sendKickMsg(oldConn, newConn)
m, err := db.DB.GetTokenMapByUidPid(uid, constant.PlatformIDToName(platformID))
if err != nil && err != go_redis.Nil {
log.NewError(operationID, "get token from redis err", err.Error(), uid, constant.PlatformIDToName(platformID))
@@ -229,8 +244,12 @@ func (ws *WServer) MultiTerminalLoginChecker(uid string, platformID int, newConn
if err != nil {
log.NewError(operationID, "conn close err", err.Error(), uid, platformID)
}
+ callbackResp := callbackUserKickOff(operationID, uid, platformID)
+ if callbackResp.ErrCode != 0 {
+ log.NewError(operationID, utils.GetSelfFuncName(), "callbackUserOffline failed", callbackResp)
+ }
} else {
- log.NewWarn(operationID, "abnormal uid-conn ", uid, platformID, oldConnMap[platformID])
+ log.Debug(operationID, "normal uid-conn ", uid, platformID, oldConnMap[platformID])
}
} else {
@@ -263,12 +282,12 @@ func (ws *WServer) sendKickMsg(oldConn, newConn *UserConn) {
func (ws *WServer) addUserConn(uid string, platformID int, conn *UserConn, token string, operationID string) {
rwLock.Lock()
defer rwLock.Unlock()
- log.Info(operationID, utils.GetSelfFuncName(), " args: ", uid, platformID, conn, token)
+ log.Info(operationID, utils.GetSelfFuncName(), " args: ", uid, platformID, conn, token, "ip: ", conn.RemoteAddr().String())
callbackResp := callbackUserOnline(operationID, uid, platformID, token)
if callbackResp.ErrCode != 0 {
log.NewError(operationID, utils.GetSelfFuncName(), "callbackUserOnline resp:", callbackResp)
}
- //go ws.MultiTerminalLoginRemoteChecker(uid, int32(platformID), token, operationID)
+ go ws.MultiTerminalLoginRemoteChecker(uid, int32(platformID), token, operationID)
ws.MultiTerminalLoginChecker(uid, platformID, conn, token, operationID)
if oldConnMap, ok := ws.wsUserToConn[uid]; ok {
oldConnMap[platformID] = conn
diff --git a/internal/msg_transfer/logic/init.go b/internal/msg_transfer/logic/init.go
index 38d0e5b66..44ce192a6 100644
--- a/internal/msg_transfer/logic/init.go
+++ b/internal/msg_transfer/logic/init.go
@@ -36,8 +36,8 @@ var (
func Init() {
cmdCh = make(chan Cmd2Value, 10000)
w = new(sync.Mutex)
- persistentCH.Init()
- historyCH.Init(cmdCh)
+ persistentCH.Init() // 订阅ws2mschat 消费到 mysql
+ historyCH.Init(cmdCh) // 订阅ws2mschat 如果可靠性存储 消费到 incrseq 再存入mongo 再push || 非可靠性 直接incr再push 初始化ws2mschat
historyMongoCH.Init()
onlineTopicStatus = OnlineTopicVacancy
//offlineHistoryCH.Init(cmdCh)
diff --git a/internal/msg_transfer/logic/online_history_msg_handler.go b/internal/msg_transfer/logic/online_history_msg_handler.go
index 34f950320..537138dae 100644
--- a/internal/msg_transfer/logic/online_history_msg_handler.go
+++ b/internal/msg_transfer/logic/online_history_msg_handler.go
@@ -407,7 +407,7 @@ func (och *OnlineHistoryRedisConsumerHandler) ConsumeClaim(sess sarama.ConsumerG
rwLock.Unlock()
split := 1000
triggerID = utils.OperationIDGenerator()
- log.NewWarn(triggerID, "timer trigger msg consumer start", len(ccMsg))
+ log.Debug(triggerID, "timer trigger msg consumer start", len(ccMsg))
for i := 0; i < len(ccMsg)/split; i++ {
//log.Debug()
och.msgDistributionCh <- Cmd2Value{Cmd: ConsumerMsgs, Value: TriggerChannelValue{
@@ -419,9 +419,8 @@ func (och *OnlineHistoryRedisConsumerHandler) ConsumeClaim(sess sarama.ConsumerG
}
//sess.MarkMessage(ccMsg[len(cMsg)-1], "")
- log.NewWarn(triggerID, "timer trigger msg consumer end", len(cMsg))
+ log.Debug(triggerID, "timer trigger msg consumer end", len(cMsg))
}
-
}
}
@@ -519,7 +518,7 @@ func sendMessageToPush(message *pbMsg.MsgDataToMQ, pushToUserID string) {
log.Info(message.OperationID, "msg_transfer send message to push", "message", message.String())
rpcPushMsg := pbPush.PushMsgReq{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
mqPushMsg := pbMsg.PushMsgDataToMQ{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
- grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, message.OperationID)
+ grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, message.OperationID)
if grpcConn == nil {
log.Error(rpcPushMsg.OperationID, "rpc dial failed", "push data", rpcPushMsg.String())
pid, offset, err := producer.SendMessage(&mqPushMsg, mqPushMsg.PushToUserID, rpcPushMsg.OperationID)
diff --git a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go
index 58575f849..f08b59965 100644
--- a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go
+++ b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go
@@ -34,6 +34,7 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(cMsg *sarama.Con
log.Error("msg_transfer Unmarshal msg err", "", "msg", string(msg), "err", err.Error())
return
}
+ log.Info(msgFromMQ.TriggerID, "BatchInsertChat2DB userID: ", msgFromMQ.AggregationID, "msgFromMQ.LastSeq: ", msgFromMQ.LastSeq)
err = db.DB.BatchInsertChat2DB(msgFromMQ.AggregationID, msgFromMQ.MessageList, msgFromMQ.TriggerID, msgFromMQ.LastSeq)
if err != nil {
log.NewError(msgFromMQ.TriggerID, "single data insert to mongo err", err.Error(), msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.TriggerID)
diff --git a/internal/push/fcm/push.go b/internal/push/fcm/push.go
index 7c1f55d00..99338e558 100644
--- a/internal/push/fcm/push.go
+++ b/internal/push/fcm/push.go
@@ -5,7 +5,7 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
- "Open_IM/pkg/tools"
+ "Open_IM/pkg/tools/splitter"
"context"
firebase "firebase.google.com/go"
"firebase.google.com/go/messaging"
@@ -62,7 +62,7 @@ func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string,
}
Success := 0
Fail := 0
- result := tools.NewSplitter(SinglePushCountLimit, Tokens).GetSplitResult()
+ result := splitter.NewSplitter(SinglePushCountLimit, Tokens).GetSplitResult()
Msg := new(messaging.MulticastMessage)
Msg.Notification = &messaging.Notification{}
Msg.Notification.Body = detailContent
diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go
index 03d3346ce..359d847f0 100644
--- a/internal/push/getui/push.go
+++ b/internal/push/getui/push.go
@@ -83,6 +83,7 @@ type Alert struct {
type Android struct {
Ups struct {
Notification Notification `json:"notification"`
+ Options Options `json:"options"`
} `json:"ups"`
}
@@ -92,6 +93,18 @@ type Notification struct {
ClickType string `json:"click_type"`
}
+type Options struct {
+ HW struct {
+ DefaultSound bool `json:"/message/android/notification/default_sound"`
+ ChannelID string `json:"/message/android/notification/channel_id"`
+ Sound string `json:"/message/android/notification/sound"`
+ Importance string `json:"/message/android/notification/importance"`
+ } `json:"HW"`
+ XM struct {
+ ChannelID string `json:"/extra.channel_id"`
+ } `json:""`
+}
+
type PushResp struct {
}
@@ -120,7 +133,7 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, operationID stri
}
pushReq.PushMessage.Notification = Notification{
Title: alert,
- Body: alert,
+ Body: detailContent,
ClickType: "startapp",
}
pushReq.PushChannel.Ios.Aps.Sound = "default"
@@ -133,6 +146,17 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, operationID stri
Body: alert,
ClickType: "startapp",
}
+ pushReq.PushChannel.Android.Ups.Options = Options{
+ HW: struct {
+ DefaultSound bool `json:"/message/android/notification/default_sound"`
+ ChannelID string `json:"/message/android/notification/channel_id"`
+ Sound string `json:"/message/android/notification/sound"`
+ Importance string `json:"/message/android/notification/importance"`
+ }{ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "NORMAL"},
+ XM: struct {
+ ChannelID string `json:"/extra.channel_id"`
+ }{ChannelID: "high_system"},
+ }
pushResp := PushResp{}
err = g.request(PushURL, pushReq, token, &pushResp, operationID)
switch err {
@@ -179,7 +203,7 @@ func (g *Getui) request(url string, content interface{}, token string, returnStr
return err
}
client := &http.Client{}
- log.Debug(operationID, utils.GetSelfFuncName(), "json:", string(con))
+ log.Debug(operationID, utils.GetSelfFuncName(), "json:", string(con), "token:", token)
req, err := http.NewRequest("POST", config.Config.Push.Getui.PushUrl+url, bytes.NewBuffer(con))
if err != nil {
return err
@@ -197,7 +221,7 @@ func (g *Getui) request(url string, content interface{}, token string, returnStr
if err != nil {
return err
}
- log.NewInfo(operationID, "getui", utils.GetSelfFuncName(), "resp, ", string(result))
+ log.NewDebug(operationID, "getui", utils.GetSelfFuncName(), "resp, ", string(result))
commonResp := GetuiCommonResp{}
commonResp.Data = returnStruct
if err := json.Unmarshal(result, &commonResp); err != nil {
diff --git a/internal/push/logic/callback.go b/internal/push/logic/callback.go
index cc897322d..1bb51fcc1 100644
--- a/internal/push/logic/callback.go
+++ b/internal/push/logic/callback.go
@@ -2,6 +2,7 @@ package logic
import (
cbApi "Open_IM/pkg/call_back_struct"
+ "Open_IM/pkg/common/callback"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/http"
@@ -11,7 +12,7 @@ import (
http2 "net/http"
)
-func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.MsgData, offlinePushUserIDList *[]string) cbApi.CommonCallbackResp {
+func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.MsgData, offlinePushUserIDList *[]string, offlineInfo *commonPb.OfflinePushInfo) cbApi.CommonCallbackResp {
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
if !config.Config.Callback.CallbackOfflinePush.Enable {
return callbackResp
@@ -32,7 +33,7 @@ func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.
ContentType: msg.ContentType,
SessionType: msg.SessionType,
AtUserIDList: msg.AtUserIDList,
- Content: string(msg.Content),
+ Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp}
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackOfflinePush.CallbackTimeOut); err != nil {
@@ -46,8 +47,13 @@ func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.
return callbackResp
}
}
- if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow && len(resp.UserIDList) != 0 {
- *offlinePushUserIDList = resp.UserIDList
+ if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow {
+ if len(resp.UserIDList) != 0 {
+ *offlinePushUserIDList = resp.UserIDList
+ }
+ if resp.OfflinePushInfo != nil {
+ *offlineInfo = *resp.OfflinePushInfo
+ }
}
log.NewDebug(operationID, utils.GetSelfFuncName(), offlinePushUserIDList, resp.UserIDList)
return callbackResp
@@ -74,7 +80,7 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M
ContentType: msg.ContentType,
SessionType: msg.SessionType,
AtUserIDList: msg.AtUserIDList,
- Content: string(msg.Content),
+ Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp}
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackOnlinePush.CallbackTimeOut); err != nil {
@@ -92,6 +98,7 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M
}
func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg *commonPb.MsgData, pushToUserList *[]string) cbApi.CommonCallbackResp {
+ log.Debug(operationID, utils.GetSelfFuncName(), groupID, msg.String(), pushToUserList)
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
if !config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.Enable {
return callbackResp
@@ -109,7 +116,7 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg
ContentType: msg.ContentType,
SessionType: msg.SessionType,
AtUserIDList: msg.AtUserIDList,
- Content: string(msg.Content),
+ Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: &callbackResp}
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.CallbackTimeOut); err != nil {
diff --git a/internal/push/logic/push_handler.go b/internal/push/logic/push_handler.go
index ccc00b480..f137c09d6 100644
--- a/internal/push/logic/push_handler.go
+++ b/internal/push/logic/push_handler.go
@@ -13,6 +13,7 @@ import (
"Open_IM/pkg/common/log"
pbChat "Open_IM/pkg/proto/msg"
pbPush "Open_IM/pkg/proto/push"
+ "Open_IM/pkg/utils"
"github.com/Shopify/sarama"
"github.com/golang/protobuf/proto"
)
@@ -43,6 +44,11 @@ func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) {
MsgData: msgFromMQ.MsgData,
PushToUserID: msgFromMQ.PushToUserID,
}
+ sec := msgFromMQ.MsgData.SendTime / 1000
+ nowSec := utils.GetCurrentTimestampBySecond()
+ if nowSec-sec > 10 {
+ return
+ }
switch msgFromMQ.MsgData.SessionType {
case constant.SuperGroupChatType:
MsgToSuperGroupUser(pbData)
@@ -59,6 +65,7 @@ func (ms *PushConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession,
for msg := range claim.Messages() {
log.NewDebug("", "kafka get info to mysql", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value))
ms.msgHandle[msg.Topic](msg.Value)
+ sess.MarkMessage(msg, "")
}
return nil
}
diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go
index 1ab1ee989..766704e1b 100644
--- a/internal/push/logic/push_to_client.go
+++ b/internal/push/logic/push_to_client.go
@@ -17,12 +17,13 @@ import (
pbPush "Open_IM/pkg/proto/push"
pbRelay "Open_IM/pkg/proto/relay"
pbRtc "Open_IM/pkg/proto/rtc"
+ commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"encoding/json"
- "github.com/golang/protobuf/proto"
- "google.golang.org/grpc"
"strings"
+
+ "github.com/golang/protobuf/proto"
)
type OpenIMContent struct {
@@ -37,16 +38,13 @@ type AtContent struct {
IsAtSelf bool `json:"isAtSelf"`
}
-var grpcCons []*grpc.ClientConn
+//var grpcCons []*grpc.ClientConn
func MsgToUser(pushMsg *pbPush.PushMsgReq) {
var wsResult []*pbRelay.SingelMsgToUserResultList
isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush)
log.Debug(pushMsg.OperationID, "Get msg from msg_transfer And push msg", pushMsg.String())
- if len(grpcCons) == 0 {
- log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
- grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
- }
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
var UIDList = []string{pushMsg.PushToUserID}
callbackResp := callbackOnlinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData)
@@ -98,8 +96,9 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
var content string
if pushMsg.MsgData.OfflinePushInfo != nil {
content = pushMsg.MsgData.OfflinePushInfo.Title
-
- } else {
+ jsonCustomContent = pushMsg.MsgData.OfflinePushInfo.Desc
+ }
+ if content == "" {
switch pushMsg.MsgData.ContentType {
case constant.Text:
content = constant.ContentType2PushContent[constant.Text]
@@ -126,8 +125,8 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
}
}
-
- callbackResp := callbackOfflinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData, &[]string{})
+ var offlineInfo commonPb.OfflinePushInfo
+ callbackResp := callbackOfflinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData, &[]string{}, &offlineInfo)
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp")
if callbackResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp)
@@ -136,6 +135,12 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offlinePush stop")
return
}
+ if offlineInfo.Title != "" {
+ content = offlineInfo.Title
+ }
+ if offlineInfo.Desc != "" {
+ jsonCustomContent = offlineInfo.Desc
+ }
if offlinePusher == nil {
return
}
@@ -156,7 +161,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
var wsResult []*pbRelay.SingelMsgToUserResultList
isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush)
- log.Debug(pushMsg.OperationID, "Get super group msg from msg_transfer And push msg", pushMsg.String())
+ log.Debug(pushMsg.OperationID, "Get super group msg from msg_transfer And push msg", pushMsg.String(), config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.Enable)
var pushToUserIDList []string
if config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.Enable {
callbackResp := callbackBeforeSuperGroupOnlinePush(pushMsg.OperationID, pushMsg.PushToUserID, pushMsg.MsgData, &pushToUserIDList)
@@ -172,9 +177,9 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
}
if len(pushToUserIDList) == 0 {
getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: pushMsg.OperationID, GroupID: pushMsg.MsgData.GroupID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, pushMsg.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, pushMsg.OperationID)
if etcdConn == nil {
- errMsg := pushMsg.OperationID + "getcdv3.GetConn == nil"
+ errMsg := pushMsg.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(pushMsg.OperationID, errMsg)
return
}
@@ -191,13 +196,10 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
pushToUserIDList = cacheResp.UserIDList
}
- if len(grpcCons) == 0 {
- log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
- grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
- }
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
//Online push message
- log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
+ log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
for _, v := range grpcCons {
msgClient := pbRelay.NewRelayClient(v)
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: pushToUserIDList})
@@ -232,6 +234,7 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
var content string
if pushMsg.MsgData.OfflinePushInfo != nil {
content = pushMsg.MsgData.OfflinePushInfo.Title
+ jsonCustomContent = pushMsg.MsgData.OfflinePushInfo.Desc
} else {
switch pushMsg.MsgData.ContentType {
@@ -263,7 +266,8 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
if len(onlineFailedUserIDList) > 0 {
var offlinePushUserIDList []string
var needOfflinePushUserIDList []string
- callbackResp := callbackOfflinePush(pushMsg.OperationID, onlineFailedUserIDList, pushMsg.MsgData, &offlinePushUserIDList)
+ var offlineInfo commonPb.OfflinePushInfo
+ callbackResp := callbackOfflinePush(pushMsg.OperationID, onlineFailedUserIDList, pushMsg.MsgData, &offlinePushUserIDList, &offlineInfo)
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp")
if callbackResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp)
@@ -277,6 +281,12 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
} else {
needOfflinePushUserIDList = onlineFailedUserIDList
}
+ if offlineInfo.Title != "" {
+ content = offlineInfo.Title
+ }
+ if offlineInfo.Desc != "" {
+ jsonCustomContent = offlineInfo.Desc
+ }
if offlinePusher == nil {
return
}
@@ -321,7 +331,7 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
// sendMsgToKafka(m, m.SendID, "msgKey--sendID")
// sendMsgToKafka(m, m.RecvID, "msgKey--recvID")
// case constant.GroupChatType:
-// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
+// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
// client := pbGroup.NewGroupClient(etcdConn)
// req := &pbGroup.Req{
// GroupID: m.RecvID,
diff --git a/internal/rpc/admin_cms/admin_cms.go b/internal/rpc/admin_cms/admin_cms.go
index 4a97f94e1..19e2dc46b 100644
--- a/internal/rpc/admin_cms/admin_cms.go
+++ b/internal/rpc/admin_cms/admin_cms.go
@@ -3,11 +3,13 @@ package admin_cms
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
+ imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
openIMHttp "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbAdminCMS "Open_IM/pkg/proto/admin_cms"
+ server_api_params "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"net"
@@ -100,3 +102,55 @@ func (s *adminCMSServer) AdminLogin(_ context.Context, req *pbAdminCMS.AdminLogi
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
+
+func (s *adminCMSServer) AddUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.AddUserRegisterAddFriendIDListReq) (*pbAdminCMS.AddUserRegisterAddFriendIDListResp, error) {
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
+ resp := &pbAdminCMS.AddUserRegisterAddFriendIDListResp{}
+ if err := imdb.AddUserRegisterAddFriendIDList(req.UserIDList...); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
+ return resp, openIMHttp.WrapError(constant.ErrDB)
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
+ return resp, nil
+}
+
+func (s *adminCMSServer) ReduceUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.ReduceUserRegisterAddFriendIDListReq) (*pbAdminCMS.ReduceUserRegisterAddFriendIDListResp, error) {
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
+ resp := &pbAdminCMS.ReduceUserRegisterAddFriendIDListResp{}
+ if req.Operation == 0 {
+ if err := imdb.ReduceUserRegisterAddFriendIDList(req.UserIDList...); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
+ return resp, openIMHttp.WrapError(constant.ErrDB)
+ }
+ } else {
+ if err := imdb.DeleteAllRegisterAddFriendIDList(); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
+ return resp, openIMHttp.WrapError(constant.ErrDB)
+ }
+ }
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
+ return resp, nil
+}
+
+func (s *adminCMSServer) GetUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.GetUserRegisterAddFriendIDListReq) (*pbAdminCMS.GetUserRegisterAddFriendIDListResp, error) {
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
+ resp := &pbAdminCMS.GetUserRegisterAddFriendIDListResp{UserInfoList: []*server_api_params.UserInfo{}}
+ userIDList, err := imdb.GetRegisterAddFriendList(req.Pagination.ShowNumber, req.Pagination.PageNumber)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
+ return resp, openIMHttp.WrapError(constant.ErrDB)
+ }
+ userList, err := imdb.GetUsersByUserIDList(userIDList)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userIDList)
+ return resp, openIMHttp.WrapError(constant.ErrDB)
+ }
+ log.NewDebug(req.OperationID, utils.GetSelfFuncName(), userList, userIDList)
+ resp.Pagination = &server_api_params.ResponsePagination{
+ CurrentPage: req.Pagination.PageNumber,
+ ShowNumber: req.Pagination.ShowNumber,
+ }
+ utils.CopyStructFields(&resp.UserInfoList, userList)
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
+ return resp, nil
+}
diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go
index 7c5aa9168..a460a9033 100644
--- a/internal/rpc/auth/auth.go
+++ b/internal/rpc/auth/auth.go
@@ -29,8 +29,18 @@ func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq)
user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth))
}
log.Debug(req.OperationID, "copy ", user, req.UserInfo)
+ Limited, LimitError := imdb.IsLimitRegisterIp(req.UserInfo.CreateIp)
+ if LimitError != nil {
+ return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: LimitError.Error()}}, nil
+ }
+ if Limited {
+ return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.RegisterLimit, ErrMsg: "Register Limit"}}, nil
+ }
err := imdb.UserRegister(user)
if err != nil {
+ if err == constant.InvitationMsg {
+ return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.InvitationError, ErrMsg: "邀请码错误"}}, nil
+ }
errMsg := req.OperationID + " imdb.UserRegister failed " + err.Error() + user.UserID
log.NewError(req.OperationID, errMsg, user)
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
@@ -67,11 +77,11 @@ func (rpc *rpcAuth) ForceLogout(_ context.Context, req *pbAuth.ForceLogoutReq) (
log.NewError(req.OperationID, errMsg)
return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}}, nil
}
- if err := token_verify.DeleteToken(req.FromUserID, int(req.Platform)); err != nil {
- errMsg := req.OperationID + " DeleteToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform)
- log.NewError(req.OperationID, errMsg)
- return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
- }
+ //if err := token_verify.DeleteToken(req.FromUserID, int(req.Platform)); err != nil {
+ // errMsg := req.OperationID + " DeleteToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform)
+ // log.NewError(req.OperationID, errMsg)
+ // return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
+ //}
if err := rpc.forceKickOff(req.FromUserID, req.Platform, req.OperationID); err != nil {
errMsg := req.OperationID + " forceKickOff failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform)
log.NewError(req.OperationID, errMsg)
@@ -82,8 +92,8 @@ func (rpc *rpcAuth) ForceLogout(_ context.Context, req *pbAuth.ForceLogoutReq) (
}
func (rpc *rpcAuth) forceKickOff(userID string, platformID int32, operationID string) error {
-
- grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
+ log.NewInfo(operationID, utils.GetSelfFuncName(), " args ", userID, platformID)
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
for _, v := range grpcCons {
client := pbRelay.NewRelayClient(v)
kickReq := &pbRelay.KickUserOfflineReq{OperationID: operationID, KickUserIDList: []string{userID}, PlatformID: platformID}
@@ -91,7 +101,6 @@ func (rpc *rpcAuth) forceKickOff(userID string, platformID int32, operationID st
_, err := client.KickUserOffline(context.Background(), kickReq)
return utils.Wrap(err, "")
}
-
return errors.New("no rpc node ")
}
diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go
index 77fc58e63..6fb04dfd4 100644
--- a/internal/rpc/conversation/conversaion.go
+++ b/internal/rpc/conversation/conversaion.go
@@ -5,6 +5,7 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
+ rocksCache "Open_IM/pkg/common/db/rocks_cache"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation"
@@ -30,6 +31,7 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbConversation.ModifyConversationFieldResp{}
var err error
+ isSyncConversation := true
if req.Conversation.ConversationType == constant.GroupChatType {
groupInfo, err := imdb.GetGroupInfoByGroupID(req.Conversation.GroupID)
if err != nil {
@@ -37,7 +39,7 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
- if groupInfo.Status == constant.GroupStatusDismissed && !req.Conversation.IsNotInGroup {
+ if groupInfo.Status == constant.GroupStatusDismissed && !req.Conversation.IsNotInGroup && req.FieldType != constant.FieldUnread {
errMsg := "group status is dismissed"
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}
return resp, nil
@@ -71,8 +73,8 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
case constant.FieldAttachedInfo:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"attached_info": conversation.AttachedInfo})
case constant.FieldUnread:
- err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"unread_count": conversation.UnreadCount})
-
+ isSyncConversation = false
+ err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"update_unread_count_time": utils.GetCurrentTimestampByMill()})
}
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateColumnsConversations error", err.Error())
@@ -81,6 +83,11 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
}
for _, v := range utils.DifferenceString(haveUserID, req.UserIDList) {
conversation.OwnerUserID = v
+ conversation.UpdateUnreadCountTime = utils.GetCurrentTimestampByMill()
+ err = rocksCache.DelUserConversationIDListFromCache(v)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), v, req.Conversation.ConversationID, err.Error())
+ }
err := imdb.SetOneConversation(conversation)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
@@ -88,6 +95,7 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
return resp, nil
}
}
+
// notification
if req.Conversation.ConversationType == constant.SingleChatType && req.FieldType == constant.FieldIsPrivateChat {
//sync peer user conversation if conversation is singleChatType
@@ -96,10 +104,24 @@ func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbCo
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
+
} else {
- for _, v := range req.UserIDList {
- chat.ConversationChangeNotification(req.OperationID, v)
+ if isSyncConversation {
+ for _, v := range req.UserIDList {
+ if err = rocksCache.DelConversationFromCache(v, req.Conversation.ConversationID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), v, req.Conversation.ConversationID, err.Error())
+ }
+ chat.ConversationChangeNotification(req.OperationID, v)
+ }
+ } else {
+ for _, v := range req.UserIDList {
+ if err = rocksCache.DelConversationFromCache(v, req.Conversation.ConversationID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), v, req.Conversation.ConversationID, err.Error())
+ }
+ chat.ConversationUnreadChangeNotification(req.OperationID, v, req.Conversation.ConversationID)
+ }
}
+
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return", resp.String())
resp.CommonResp = &pbConversation.CommonResp{}
@@ -125,6 +147,10 @@ func syncPeerUserConversation(conversation *pbConversation.Conversation, operati
log.NewError(operationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
return err
}
+ err = rocksCache.DelConversationFromCache(conversation.UserID, utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType))
+ if err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), "DelConversationFromCache failed", err.Error())
+ }
chat.ConversationSetPrivateNotification(operationID, conversation.OwnerUserID, conversation.UserID, conversation.IsPrivateChat)
return nil
}
diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go
index 6ce4d62da..6a699d278 100644
--- a/internal/rpc/friend/friend.go
+++ b/internal/rpc/friend/friend.go
@@ -100,9 +100,9 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl
}
log.NewInfo(req.CommID.OperationID, "AddBlacklist rpc ok ", req.CommID.FromUserID, req.CommID.ToUserID)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -211,9 +211,9 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
resp.CommonResp.ErrMsg = errMsg
resp.CommonResp.ErrCode = 500
@@ -315,9 +315,9 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
}
// cache rpc
delFriendIDListFromCacheReq := &pbCache.DelFriendIDListFromCacheReq{OperationID: req.CommID.OperationID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -378,9 +378,9 @@ func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFri
}
log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok")
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -473,9 +473,9 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove
}
log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok ")
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID)
if etcdConn == nil {
- errMsg := req.CommID.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.CommID.OperationID, errMsg)
return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go
index 1f728d6d7..beff56072 100644
--- a/internal/rpc/group/group.go
+++ b/internal/rpc/group/group.go
@@ -61,7 +61,13 @@ func (s *groupServer) Run() {
log.NewInfo("", "listen network success, ", address, listener)
defer listener.Close()
//grpc server
- srv := grpc.NewServer()
+ recvSize := 1024 * 1024 * constant.GroupRPCRecvSize
+ sendSize := 1024 * 1024 * constant.GroupRPCSendSize
+ var options = []grpc.ServerOption{
+ grpc.MaxRecvMsgSize(recvSize),
+ grpc.MaxSendMsgSize(sendSize),
+ }
+ srv := grpc.NewServer(options...)
defer srv.GracefulStop()
//Service registers with etcd
pbGroup.RegisterGroupServer(srv, s)
@@ -138,7 +144,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if req.GroupInfo.GroupType != constant.SuperGroup {
//to group member
for _, user := range req.InitMemberList {
- us, err := imdb.GetUserByUserID(user.UserID)
+ us, err := rocksCache.GetUserInfoFromCache(user.UserID)
if err != nil {
log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), user.UserID)
continue
@@ -158,7 +164,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
}
okUserIDList = append(okUserIDList, user.UserID)
}
- group, err := imdb.GetGroupInfoByGroupID(groupId)
+ group, err := rocksCache.GetGroupInfoFromCache(groupId)
if err != nil {
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupId)
resp.ErrCode = constant.ErrDB.ErrCode
@@ -166,7 +172,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
return resp, nil
}
utils.CopyStructFields(resp.GroupInfo, group)
- memberCount, err := imdb.GetGroupMemberNumByGroupID(groupId)
+ memberCount, err := rocksCache.GetGroupMemberNumFromCache(groupId)
resp.GroupInfo.MemberCount = uint32(memberCount)
if err != nil {
log.NewError(req.OperationID, "GetGroupMemberNumByGroupID failed ", err.Error(), groupId)
@@ -235,7 +241,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo
var resp pbGroup.GetJoinedGroupListResp
for _, v := range joinedGroupList {
var groupNode open_im_sdk.GroupInfo
- num, err := imdb.GetGroupMemberNumByGroupID(v)
+ num, err := rocksCache.GetGroupMemberNumFromCache(v)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), v)
continue
@@ -250,6 +256,9 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), v)
continue
}
+ if group.GroupType == constant.SuperGroup {
+ continue
+ }
if group.Status == constant.GroupStatusDismissed {
log.NewError(req.OperationID, "constant.GroupStatusDismissed ", group)
continue
@@ -375,7 +384,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
haveConUserID = append(haveConUserID, v.OwnerUserID)
}
var reqPb pbUser.SetConversationReq
- var c pbUser.Conversation
+ var c pbConversation.Conversation
for _, v := range conversations {
reqPb.OperationID = req.OperationID
c.OwnerUserID = v.OwnerUserID
@@ -390,9 +399,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
c.IsNotInGroup = false
c.Ex = v.Ex
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
@@ -412,9 +421,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
c.GroupID = req.GroupID
c.IsNotInGroup = false
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
@@ -434,9 +443,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
@@ -453,7 +462,12 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil
}
-
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ }
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
if groupInfo.GroupType != constant.SuperGroup {
for _, userID := range okUserIDList {
err = rocksCache.DelJoinedGroupIDListFromCache(userID)
@@ -461,9 +475,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
}
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
- }
+
chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList)
} else {
for _, v := range req.InvitedUserIDList {
@@ -485,7 +497,6 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) {
log.NewInfo(req.OperationID, "GetGroupAllMember, args ", req.String())
var resp pbGroup.GetGroupAllMemberResp
- //groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
groupInfo, err := rocksCache.GetGroupInfoFromCache(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
@@ -494,7 +505,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro
return &resp, nil
}
if groupInfo.GroupType != constant.SuperGroup {
- memberList, err := rocksCache.GetAllGroupMembersInfoFromCache(req.GroupID)
+ memberList, err := rocksCache.GetGroupMembersInfoFromCache(req.Count, req.Offset, req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
resp.ErrCode = constant.ErrDB.ErrCode
@@ -507,7 +518,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro
resp.MemberList = append(resp.MemberList, &node)
}
}
- log.NewInfo(req.OperationID, "GetGroupAllMember rpc return ", resp.String())
+ log.NewInfo(req.OperationID, "GetGroupAllMember rpc return ", len(resp.MemberList))
return &resp, nil
}
@@ -560,7 +571,7 @@ func (s *groupServer) getGroupUserLevel(groupID, userID string) (int, error) {
func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGroupMemberReq) (*pbGroup.KickGroupMemberResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
- groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
+ groupInfo, err := rocksCache.GetGroupInfoFromCache(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupInfoByGroupID", req.GroupID, err.Error())
return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil
@@ -570,7 +581,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
if groupInfo.GroupType != constant.SuperGroup {
opFlag := 0
if !token_verify.IsManagerUserID(req.OpUserID) {
- opInfo, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, req.OpUserID)
+ opInfo, err := rocksCache.GetGroupMemberInfoFromCache(req.GroupID, req.OpUserID)
if err != nil {
errMsg := req.OperationID + " GetGroupMemberInfoByGroupIDAndUserID failed " + err.Error() + req.GroupID + req.OpUserID
log.Error(req.OperationID, errMsg)
@@ -597,7 +608,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
//remove
for _, v := range req.KickedUserIDList {
- kickedInfo, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, v)
+ kickedInfo, err := rocksCache.GetGroupMemberInfoFromCache(req.GroupID, v)
if err != nil {
log.NewError(req.OperationID, " GetGroupMemberInfoByGroupIDAndUserID failed ", req.GroupID, v, err.Error())
resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1})
@@ -615,7 +626,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
continue
}
- err = imdb.RemoveGroupMember(req.GroupID, v)
+ err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, v)
if err != nil {
log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v)
resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1})
@@ -626,7 +637,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
}
}
var reqPb pbUser.SetConversationReq
- var c pbUser.Conversation
+ var c pbConversation.Conversation
for _, v := range okUserIDList {
reqPb.OperationID = req.OperationID
c.OwnerUserID = v
@@ -635,9 +646,9 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
c.GroupID = req.GroupID
c.IsNotInGroup = true
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
resp.ErrCode = constant.ErrInternal.ErrCode
resp.ErrMsg = errMsg
@@ -661,9 +672,9 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
@@ -680,6 +691,9 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil
}
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ }
if groupInfo.GroupType != constant.SuperGroup {
for _, userID := range okUserIDList {
@@ -687,8 +701,11 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
}
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, userID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
chat.MemberKickedNotification(req, okUserIDList)
@@ -715,22 +732,35 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
var resp pbGroup.GetGroupMembersInfoResp
resp.MemberList = []*open_im_sdk.GroupMemberFullInfo{}
- groupMembers, err := rocksCache.GetAllGroupMembersInfoFromCache(req.GroupID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
- resp.ErrCode = constant.ErrDB.ErrCode
- resp.ErrMsg = constant.ErrDB.ErrMsg
- return &resp, nil
- }
- for _, member := range groupMembers {
- if utils.IsContain(member.UserID, req.MemberList) {
- var memberNode open_im_sdk.GroupMemberFullInfo
- utils.CopyStructFields(&memberNode, member)
- memberNode.JoinTime = int32(member.JoinTime.Unix())
- resp.MemberList = append(resp.MemberList, &memberNode)
+
+ for _, userID := range req.MemberList {
+ groupMember, err := rocksCache.GetGroupMemberInfoFromCache(req.GroupID, userID)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, userID, err.Error())
+ continue
}
+ var memberNode open_im_sdk.GroupMemberFullInfo
+ utils.CopyStructFields(&memberNode, groupMember)
+ memberNode.JoinTime = int32(groupMember.JoinTime.Unix())
+ resp.MemberList = append(resp.MemberList, &memberNode)
}
+ //groupMembers, err := rocksCache.GetAllGroupMembersInfoFromCache(req.GroupID)
+ //if err != nil {
+ // log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ // resp.ErrCode = constant.ErrDB.ErrCode
+ // resp.ErrMsg = constant.ErrDB.ErrMsg
+ // return &resp, nil
+ //}
+ //for _, member := range groupMembers {
+ // if utils.IsContain(member.UserID, req.MemberList) {
+ // var memberNode open_im_sdk.GroupMemberFullInfo
+ // utils.CopyStructFields(&memberNode, member)
+ // memberNode.JoinTime = int32(member.JoinTime.Unix())
+ // resp.MemberList = append(resp.MemberList, &memberNode)
+ // }
+ //}
+
resp.ErrCode = 0
log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp.String())
return &resp, nil
@@ -840,7 +870,7 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
}
var reqPb pbUser.SetConversationReq
reqPb.OperationID = req.OperationID
- var c pbUser.Conversation
+ var c pbConversation.Conversation
conversation, err := imdb.GetConversation(req.FromUserID, utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType))
if err != nil {
c.OwnerUserID = req.FromUserID
@@ -862,9 +892,9 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
c.Ex = conversation.Ex
}
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -876,9 +906,9 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String())
}
- etcdCacheConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdCacheConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdCacheConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -892,19 +922,15 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
-
- group, err := rocksCache.GetGroupInfoFromCache(req.GroupID)
- if err != nil {
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
}
- if group != nil {
- if group.GroupType != constant.SuperGroup {
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
- }
- }
+ if err := rocksCache.DelJoinedGroupIDListFromCache(req.FromUserID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.FromUserID, err.Error())
+ }
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
-
chat.GroupApplicationAcceptedNotification(req)
chat.MemberEnterNotification(req)
} else if req.HandleResult == constant.GroupResponseRefuse {
@@ -951,9 +977,9 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember)
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: constant.ErrInternal.ErrMsg}}, nil
}
@@ -970,22 +996,16 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- //for _, userID := range okUserIDList {
- // err = rocksCache.DelJoinedGroupIDListFromCache(userID)
- // if err != nil {
- // log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
- // }
- //}
err = rocksCache.DelJoinedGroupIDListFromCache(req.OpUserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
}
-
- err = rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID)
- if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ }
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
-
chat.MemberEnterDirectlyNotification(req.GroupID, req.OpUserID, req.OperationID)
log.NewInfo(req.OperationID, "JoinGroup rpc return ")
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
@@ -1044,7 +1064,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
}
//modify quitter conversation info
var reqPb pbUser.SetConversationReq
- var c pbUser.Conversation
+ var c pbConversation.Conversation
reqPb.OperationID = req.OperationID
c.OwnerUserID = req.OpUserID
c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
@@ -1052,9 +1072,9 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
c.GroupID = req.GroupID
c.IsNotInGroup = true
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -1073,9 +1093,9 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: constant.ErrInternal.ErrMsg}}, nil
}
@@ -1092,14 +1112,19 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
-
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ }
if groupInfo.GroupType != constant.SuperGroup {
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
- }
if err := rocksCache.DelJoinedGroupIDListFromCache(req.OpUserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.OpUserID)
}
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.OpUserID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
chat.MemberQuitNotification(req)
} else {
if err := rocksCache.DelJoinedSuperGroupIDListFromCache(req.OpUserID); err != nil {
@@ -1223,9 +1248,9 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf
if req.GroupInfoForSet.Notification != "" {
//get group member user id
getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: req.OperationID, GroupID: req.GroupInfoForSet.GroupID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, http.WrapError(constant.ErrInternal)
}
@@ -1252,9 +1277,9 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf
conversationReq.FieldType = constant.FieldGroupAtType
conversation.GroupAtType = constant.GroupNotification
conversationReq.UserIDList = cacheResp.UserIDList
- nEtcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
+ nEtcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, http.WrapError(constant.ErrInternal)
}
@@ -1298,43 +1323,46 @@ func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.Transfe
log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo)
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
+ err = rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.NewOwnerUserID)
+ if err != nil {
+ log.NewError(req.OperationID, "DelGroupMemberInfoFromCache failed ", req.GroupID, req.NewOwnerUserID)
+ }
+ err = rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.OldOwnerUserID)
+ if err != nil {
+ log.NewError(req.OperationID, "DelGroupMemberInfoFromCache failed ", req.GroupID, req.OldOwnerUserID)
}
chat.GroupOwnerTransferredNotification(req)
return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
}
-func (s *groupServer) GetGroupById(_ context.Context, req *pbGroup.GetGroupByIdReq) (*pbGroup.GetGroupByIdResp, error) {
+func (s *groupServer) GetGroupByID(_ context.Context, req *pbGroup.GetGroupByIDReq) (*pbGroup.GetGroupByIDResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp := &pbGroup.GetGroupByIdResp{CMSGroup: &pbGroup.CMSGroup{
+ resp := &pbGroup.GetGroupByIDResp{CMSGroup: &pbGroup.CMSGroup{
GroupInfo: &open_im_sdk.GroupInfo{},
}}
- group, err := imdb.GetGroupById(req.GroupId)
+ group, err := imdb.GetGroupInfoByGroupID(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupById error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- resp.CMSGroup.GroupInfo = &open_im_sdk.GroupInfo{
- GroupID: group.GroupID,
- GroupName: group.GroupName,
- FaceURL: group.FaceURL,
- OwnerUserID: group.CreatorUserID,
- MemberCount: 0,
- Status: group.Status,
- CreatorUserID: group.CreatorUserID,
- GroupType: group.GroupType,
- CreateTime: uint32(group.CreateTime.Unix()),
- }
- groupMember, err := imdb.GetGroupMaster(group.GroupID)
+ utils.CopyStructFields(resp.CMSGroup.GroupInfo, group)
+ groupMember, err := imdb.GetGroupOwnerInfoByGroupID(group.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- resp.CMSGroup.GroupMasterName = groupMember.Nickname
- resp.CMSGroup.GroupMasterId = groupMember.UserID
+ groupMemberNum, err := imdb.GetGroupMemberNumByGroupID(req.GroupID)
+ if err == nil {
+ resp.CMSGroup.GroupInfo.MemberCount = uint32(groupMemberNum)
+ } else {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
+ resp.CMSGroup.GroupOwnerUserName = groupMember.Nickname
+ resp.CMSGroup.GroupOwnerUserID = groupMember.UserID
resp.CMSGroup.GroupInfo.CreatorUserID = group.CreatorUserID
+ resp.CMSGroup.GroupInfo.CreateTime = uint32(group.CreateTime.Unix())
+ utils.CopyStructFields(resp.CMSGroup.GroupInfo, group)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
@@ -1346,12 +1374,13 @@ func (s *groupServer) GetGroup(_ context.Context, req *pbGroup.GetGroupReq) (*pb
}
groups, err := imdb.GetGroupsByName(req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber)
if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsByName error", req.String())
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsByName error", req.String(), req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber)
return resp, http.WrapError(constant.ErrDB)
}
+ log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "groups", groups)
nums, err := imdb.GetGroupsCountNum(db.Group{GroupName: req.GroupName})
if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum error", err.Error())
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum error", err.Error(), req.GroupName)
return resp, http.WrapError(constant.ErrDB)
}
resp.GroupNums = nums
@@ -1360,24 +1389,18 @@ func (s *groupServer) GetGroup(_ context.Context, req *pbGroup.GetGroupReq) (*pb
ShowNumber: req.Pagination.ShowNumber,
}
for _, v := range groups {
- groupMember, err := imdb.GetGroupMaster(v.GroupID)
+ group := &pbGroup.CMSGroup{GroupInfo: &open_im_sdk.GroupInfo{}}
+ utils.CopyStructFields(group.GroupInfo, v)
+ groupMember, err := imdb.GetGroupOwnerInfoByGroupID(v.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster error", err.Error())
continue
}
- resp.CMSGroups = append(resp.CMSGroups, &pbGroup.CMSGroup{
- GroupInfo: &open_im_sdk.GroupInfo{
- GroupID: v.GroupID,
- GroupName: v.GroupName,
- FaceURL: v.FaceURL,
- OwnerUserID: v.CreatorUserID,
- Status: v.Status,
- CreatorUserID: v.CreatorUserID,
- CreateTime: uint32(v.CreateTime.Unix()),
- },
- GroupMasterName: groupMember.Nickname,
- GroupMasterId: groupMember.UserID,
- })
+
+ group.GroupInfo.CreateTime = uint32(v.CreateTime.Unix())
+ group.GroupOwnerUserID = groupMember.UserID
+ group.GroupOwnerUserName = groupMember.Nickname
+ resp.CMSGroups = append(resp.CMSGroups, group)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@@ -1394,78 +1417,49 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroups error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- groupsCountNum, err := imdb.GetGroupsCountNum(db.Group{})
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "groupsCountNum ", groupsCountNum)
+ resp.GroupNum, err = imdb.GetGroupsCountNum(db.Group{})
if err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum", err.Error())
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- resp.GroupNum = int32(groupsCountNum)
resp.Pagination.PageNumber = req.Pagination.PageNumber
resp.Pagination.ShowNumber = req.Pagination.ShowNumber
for _, v := range groups {
- groupMember, err := imdb.GetGroupMaster(v.GroupID)
+ group := &pbGroup.CMSGroup{GroupInfo: &open_im_sdk.GroupInfo{}}
+ utils.CopyStructFields(group.GroupInfo, v)
+ groupMember, err := imdb.GetGroupOwnerInfoByGroupID(v.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster failed", err.Error(), v)
continue
}
- resp.CMSGroups = append(resp.CMSGroups, &pbGroup.CMSGroup{
- GroupInfo: &open_im_sdk.GroupInfo{
- GroupID: v.GroupID,
- GroupName: v.GroupName,
- FaceURL: v.FaceURL,
- OwnerUserID: v.CreatorUserID,
- Status: v.Status,
- CreatorUserID: v.CreatorUserID,
- CreateTime: uint32(v.CreateTime.Unix()),
- },
- GroupMasterId: groupMember.UserID,
- GroupMasterName: groupMember.Nickname,
- })
+ group.GroupInfo.CreateTime = uint32(v.CreateTime.Unix())
+ group.GroupOwnerUserID = groupMember.UserID
+ group.GroupOwnerUserName = groupMember.Nickname
+ resp.CMSGroups = append(resp.CMSGroups, group)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "GetGroups ", resp.String())
return resp, nil
}
-func (s *groupServer) OperateGroupStatus(_ context.Context, req *pbGroup.OperateGroupStatusReq) (*pbGroup.OperateGroupStatusResp, error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
- resp := &pbGroup.OperateGroupStatusResp{}
- if err := imdb.OperateGroupStatus(req.GroupId, req.Status); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "OperateGroupStatus", err.Error())
- return resp, http.WrapError(constant.ErrDB)
- }
- return resp, nil
-}
-
-func (s *groupServer) DeleteGroup(_ context.Context, req *pbGroup.DeleteGroupReq) (*pbGroup.DeleteGroupResp, error) {
- log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
- resp := &pbGroup.DeleteGroupResp{}
- if err := imdb.DeleteGroup(req.GroupId); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), "DeleteGroup error", err.Error())
- return resp, http.WrapError(constant.ErrDB)
- }
- return resp, nil
-}
-
func (s *groupServer) OperateUserRole(_ context.Context, req *pbGroup.OperateUserRoleReq) (*pbGroup.OperateUserRoleResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.OperateUserRoleResp{}
- oldOwnerUserID, err := imdb.GetGroupMaster(req.GroupId)
+ oldOwnerUserID, err := imdb.GetGroupOwnerInfoByGroupID(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster failed", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return resp, http.WrapError(constant.ErrInternal)
}
client := pbGroup.NewGroupClient(etcdConn)
var reqPb pbGroup.TransferGroupOwnerReq
reqPb.OperationID = req.OperationID
- reqPb.NewOwnerUserID = req.UserId
- reqPb.GroupID = req.GroupId
+ reqPb.NewOwnerUserID = req.UserID
+ reqPb.GroupID = req.GroupID
reqPb.OpUserID = "cms admin"
reqPb.OldOwnerUserID = oldOwnerUserID.UserID
reply, err := client.TransferGroupOwner(context.Background(), &reqPb)
@@ -1481,12 +1475,12 @@ func (s *groupServer) OperateUserRole(_ context.Context, req *pbGroup.OperateUse
func (s *groupServer) GetGroupMembersCMS(_ context.Context, req *pbGroup.GetGroupMembersCMSReq) (*pbGroup.GetGroupMembersCMSResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.GetGroupMembersCMSResp{}
- groupMembers, err := imdb.GetGroupMembersByGroupIdCMS(req.GroupId, req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber)
+ groupMembers, err := imdb.GetGroupMembersByGroupIdCMS(req.GroupID, req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMembersByGroupIdCMS Error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
- groupMembersCount, err := imdb.GetGroupMembersCount(req.GroupId, req.UserName)
+ groupMembersCount, err := imdb.GetGroupMembersCount(req.GroupID, req.UserName)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMembersCMS Error", err.Error())
return resp, http.WrapError(constant.ErrDB)
@@ -1494,15 +1488,11 @@ func (s *groupServer) GetGroupMembersCMS(_ context.Context, req *pbGroup.GetGrou
log.NewInfo(req.OperationID, groupMembersCount)
resp.MemberNums = int32(groupMembersCount)
for _, groupMember := range groupMembers {
- resp.Members = append(resp.Members, &open_im_sdk.GroupMemberFullInfo{
- GroupID: req.GroupId,
- UserID: groupMember.UserID,
- RoleLevel: groupMember.RoleLevel,
- JoinTime: int32(groupMember.JoinTime.Unix()),
- Nickname: groupMember.Nickname,
- FaceURL: groupMember.FaceURL,
- JoinSource: groupMember.JoinSource,
- })
+ member := open_im_sdk.GroupMemberFullInfo{}
+ utils.CopyStructFields(&member, groupMember)
+ member.JoinTime = int32(groupMember.JoinTime.Unix())
+ member.MuteEndTime = uint32(groupMember.MuteEndTime.Unix())
+ resp.Members = append(resp.Members, &member)
}
resp.Pagination = &open_im_sdk.ResponsePagination{
CurrentPage: req.Pagination.PageNumber,
@@ -1515,8 +1505,8 @@ func (s *groupServer) GetGroupMembersCMS(_ context.Context, req *pbGroup.GetGrou
func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.RemoveGroupMembersCMSReq) (*pbGroup.RemoveGroupMembersCMSResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.RemoveGroupMembersCMSResp{}
- for _, userId := range req.UserIds {
- err := imdb.RemoveGroupMember(req.GroupId, userId)
+ for _, userId := range req.UserIDList {
+ err := imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, userId)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
resp.Failed = append(resp.Failed, userId)
@@ -1525,25 +1515,25 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
}
}
reqKick := &pbGroup.KickGroupMemberReq{
- GroupID: req.GroupId,
+ GroupID: req.GroupID,
KickedUserIDList: resp.Success,
Reason: "admin kick",
OperationID: req.OperationID,
- OpUserID: req.OpUserId,
+ OpUserID: req.OpUserID,
}
var reqPb pbUser.SetConversationReq
- var c pbUser.Conversation
+ var c pbConversation.Conversation
for _, v := range resp.Success {
reqPb.OperationID = req.OperationID
c.OwnerUserID = v
- c.ConversationID = utils.GetConversationIDBySessionType(req.GroupId, constant.GroupChatType)
+ c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType)
c.ConversationType = constant.GroupChatType
- c.GroupID = req.GroupId
+ c.GroupID = req.GroupID
c.IsNotInGroup = true
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return resp, http.WrapError(constant.ErrInternal)
}
@@ -1556,15 +1546,15 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return resp, http.WrapError(constant.ErrDB)
}
cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.DelGroupMemberIDListFromCache(context.Background(), &pbCache.DelGroupMemberIDListFromCacheReq{
- GroupID: req.GroupId,
+ GroupID: req.GroupID,
OperationID: req.OperationID,
})
if err != nil {
@@ -1575,8 +1565,17 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return resp, http.WrapError(constant.ErrDB)
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupId); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupId)
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
+
+ for _, userID := range resp.Success {
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, userID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID, userID)
+ }
}
chat.MemberKickedNotification(reqKick, resp.Success)
@@ -1585,22 +1584,22 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
}
func (s *groupServer) AddGroupMembersCMS(_ context.Context, req *pbGroup.AddGroupMembersCMSReq) (*pbGroup.AddGroupMembersCMSResp, error) {
- log.NewInfo(req.OperationId, utils.GetSelfFuncName(), "args:", req.String())
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.AddGroupMembersCMSResp{}
- for _, userId := range req.UserIds {
- if isExist := imdb.IsExistGroupMember(req.GroupId, userId); isExist {
- log.NewError(req.OperationId, utils.GetSelfFuncName(), "user is exist in group", userId, req.GroupId)
+ for _, userId := range req.UserIDList {
+ if isExist := imdb.IsExistGroupMember(req.GroupID, userId); isExist {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "user is exist in group", userId, req.GroupID)
resp.Failed = append(resp.Failed, userId)
continue
}
user, err := imdb.GetUserByUserID(userId)
if err != nil {
- log.NewError(req.OperationId, utils.GetSelfFuncName(), "GetUserByUserID", err.Error())
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserByUserID", err.Error())
resp.Failed = append(resp.Failed, userId)
continue
}
groupMember := db.GroupMember{
- GroupID: req.GroupId,
+ GroupID: req.GroupID,
UserID: userId,
Nickname: user.Nickname,
FaceURL: "",
@@ -1611,37 +1610,40 @@ func (s *groupServer) AddGroupMembersCMS(_ context.Context, req *pbGroup.AddGrou
Ex: "",
}
if err := imdb.InsertIntoGroupMember(groupMember); err != nil {
- log.NewError(req.OperationId, utils.GetSelfFuncName(), "InsertIntoGroupMember failed", req.String())
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "InsertIntoGroupMember failed", req.String())
resp.Failed = append(resp.Failed, userId)
} else {
resp.Success = append(resp.Success, userId)
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationId)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationId + "getcdv3.GetConn == nil"
- log.NewError(req.OperationId, errMsg)
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
+ log.NewError(req.OperationID, errMsg)
return resp, http.WrapError(constant.ErrDB)
}
cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.DelGroupMemberIDListFromCache(context.Background(), &pbCache.DelGroupMemberIDListFromCacheReq{
- GroupID: req.GroupId,
- OperationID: req.OperationId,
+ GroupID: req.GroupID,
+ OperationID: req.OperationID,
})
if err != nil {
- log.NewError(req.OperationId, "DelGroupMemberIDListFromCache rpc call failed ", err.Error())
+ log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc call failed ", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
if cacheResp.CommonResp.ErrCode != 0 {
- log.NewError(req.OperationId, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
+ log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return resp, http.WrapError(constant.ErrDB)
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupId); err != nil {
- log.NewError(req.OperationId, utils.GetSelfFuncName(), err.Error(), req.GroupId)
+ if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ }
+ if err := rocksCache.DelGroupMemberNumFromCache(req.GroupID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
- chat.MemberInvitedNotification(req.OperationId, req.GroupId, req.OpUserId, "admin add you to group", resp.Success)
+ chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, "admin add you to group", resp.Success)
return resp, nil
}
@@ -1705,7 +1707,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
}
//modify quitter conversation info
var reqPb pbUser.SetConversationReq
- var c pbUser.Conversation
+ var c pbConversation.Conversation
for _, v := range memberList {
reqPb.OperationID = req.OperationID
c.OwnerUserID = v.UserID
@@ -1714,9 +1716,9 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
c.GroupID = req.GroupID
c.IsNotInGroup = true
reqPb.Conversation = &c
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -1742,9 +1744,9 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
}
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 500, ErrMsg: errMsg}}, nil
}
@@ -1761,7 +1763,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return &pbGroup.DismissGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
+ if err := rocksCache.DelGroupInfoFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return ", pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""})
@@ -1809,7 +1811,7 @@ func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGrou
log.Error(req.OperationID, "UpdateGroupMemberInfo failed ", err.Error(), groupMemberInfo)
return &pbGroup.MuteGroupMemberResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.UserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
chat.GroupMemberMutedNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID, req.MutedSeconds)
@@ -1853,7 +1855,7 @@ func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.Ca
log.Error(req.OperationID, "UpdateGroupMemberInfo failed ", err.Error(), groupMemberInfo)
return &pbGroup.CancelMuteGroupMemberResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.UserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
chat.GroupMemberCancelMutedNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID)
@@ -1973,7 +1975,7 @@ func (s *groupServer) SetGroupMemberNickname(ctx context.Context, req *pbGroup.S
log.Error(req.OperationID, errMsg)
return &pbGroup.SetGroupMemberNicknameResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.UserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID)
@@ -2008,8 +2010,8 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg + ":" + err.Error()
return resp, nil
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
- log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
+ if err := rocksCache.DelGroupMemberInfoFromCache(req.GroupID, req.UserID); err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID, req.UserID)
}
if req.RoleLevel != nil {
switch req.RoleLevel.Value {
@@ -2026,3 +2028,26 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
+
+func (s *groupServer) GetGroupAbstractInfo(c context.Context, req *pbGroup.GetGroupAbstractInfoReq) (*pbGroup.GetGroupAbstractInfoResp, error) {
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
+ resp := &pbGroup.GetGroupAbstractInfoResp{CommonResp: &pbGroup.CommonResp{}}
+ hashCode, err := rocksCache.GetGroupMemberListHashFromCache(req.GroupID)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMemberListHashFromCache failed", req.GroupID, err.Error())
+ resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
+ resp.CommonResp.ErrMsg = err.Error()
+ return resp, nil
+ }
+ resp.GroupMemberListHash = hashCode
+ num, err := rocksCache.GetGroupMemberNumFromCache(req.GroupID)
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMemberNumByGroupID failed", req.GroupID, err.Error())
+ resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
+ resp.CommonResp.ErrMsg = err.Error()
+ return resp, nil
+ }
+ resp.GroupMemberNumber = int32(num)
+ log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", resp.String())
+ return resp, nil
+}
diff --git a/internal/rpc/group/super_group.go b/internal/rpc/group/super_group.go
index 9b50c7955..b667abe76 100644
--- a/internal/rpc/group/super_group.go
+++ b/internal/rpc/group/super_group.go
@@ -1,7 +1,6 @@
package group
import (
- "Open_IM/pkg/common/constant"
rocksCache "Open_IM/pkg/common/db/rocks_cache"
"Open_IM/pkg/common/log"
cp "Open_IM/pkg/common/utils"
@@ -15,7 +14,6 @@ import (
func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.GetJoinedSuperGroupListReq) (*pbGroup.GetJoinedSuperGroupListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbGroup.GetJoinedSuperGroupListResp{CommonResp: &pbGroup.CommonResp{}}
- //userToSuperGroup, err := db.DB.GetSuperGroupByUserID(req.UserID)
groupIDList, err := rocksCache.GetJoinedSuperGroupListFromCache(req.UserID)
if err != nil {
if err == redis.Nil {
@@ -23,8 +21,8 @@ func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.
return resp, nil
}
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID failed ", err.Error(), req.UserID)
- resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
- resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
+ //resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
+ //resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
for _, groupID := range groupIDList {
diff --git a/internal/rpc/message_cms/message_cms.go b/internal/rpc/message_cms/message_cms.go
index 44fdca1e4..f0757e421 100644
--- a/internal/rpc/message_cms/message_cms.go
+++ b/internal/rpc/message_cms/message_cms.go
@@ -150,7 +150,7 @@ func (s *messageCMSServer) GetChatLogs(_ context.Context, req *pbMessageCMS.GetC
pbChatLog.ReciverNickName = recvUser.Nickname
case constant.GroupChatType:
- group, err := imdb.GetGroupById(chatLog.RecvID)
+ group, err := imdb.GetGroupInfoByGroupID(chatLog.RecvID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupById failed")
continue
diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go
index f53ee327d..e60a1ff3c 100644
--- a/internal/rpc/msg/callback.go
+++ b/internal/rpc/msg/callback.go
@@ -2,6 +2,7 @@ package msg
import (
cbApi "Open_IM/pkg/call_back_struct"
+ "Open_IM/pkg/common/callback"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/http"
@@ -12,7 +13,7 @@ import (
)
func copyCallbackCommonReqStruct(msg *pbChat.SendMsgReq) cbApi.CommonCallbackReq {
- return cbApi.CommonCallbackReq{
+ req := cbApi.CommonCallbackReq{
SendID: msg.MsgData.SendID,
ServerMsgID: msg.MsgData.ServerMsgID,
ClientMsgID: msg.MsgData.ClientMsgID,
@@ -24,10 +25,13 @@ func copyCallbackCommonReqStruct(msg *pbChat.SendMsgReq) cbApi.CommonCallbackReq
ContentType: msg.MsgData.ContentType,
Status: msg.MsgData.Status,
CreateTime: msg.MsgData.CreateTime,
- Content: string(msg.MsgData.Content),
AtUserIDList: msg.MsgData.AtUserIDList,
SenderFaceURL: msg.MsgData.SenderFaceURL,
+ Content: callback.GetContent(msg.MsgData),
+ Seq: msg.MsgData.Seq,
+ Ex: msg.MsgData.Ex,
}
+ return req
}
func callbackBeforeSendSingleMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp {
@@ -134,11 +138,11 @@ func callbackAfterSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp
}
func callbackWordFilter(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp {
+ log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), msg)
callbackResp := cbApi.CommonCallbackResp{OperationID: msg.OperationID}
if !config.Config.Callback.CallbackWordFilter.Enable || msg.MsgData.ContentType != constant.Text {
return callbackResp
}
- log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), msg)
commonCallbackReq := copyCallbackCommonReqStruct(msg)
commonCallbackReq.CallbackCommand = constant.CallbackWordFilterCommand
req := cbApi.CallbackWordFilterReq{
diff --git a/internal/rpc/msg/conversation_notification.go b/internal/rpc/msg/conversation_notification.go
index b43db7959..c79f28a65 100644
--- a/internal/rpc/msg/conversation_notification.go
+++ b/internal/rpc/msg/conversation_notification.go
@@ -68,3 +68,15 @@ func ConversationChangeNotification(operationID, userID string) {
tips.DefaultTips = config.Config.Notification.ConversationOptUpdate.DefaultTips.Tips
SetConversationNotification(operationID, userID, userID, constant.ConversationOptChangeNotification, ConversationChangedTips, tips)
}
+
+//会话未读数同步
+func ConversationUnreadChangeNotification(operationID, userID, conversationID string) {
+ log.NewInfo(operationID, utils.GetSelfFuncName())
+ ConversationChangedTips := &open_im_sdk.ConversationUpdateTips{
+ UserID: userID,
+ ConversationIDList: []string{conversationID},
+ }
+ var tips open_im_sdk.TipsComm
+ tips.DefaultTips = config.Config.Notification.ConversationOptUpdate.DefaultTips.Tips
+ SetConversationNotification(operationID, userID, userID, constant.ConversationUnreadNotification, ConversationChangedTips, tips)
+}
diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go
index 7865ad564..ab39a3662 100644
--- a/internal/rpc/msg/send_msg.go
+++ b/internal/rpc/msg/send_msg.go
@@ -4,6 +4,7 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
+ rocksCache "Open_IM/pkg/common/db/rocks_cache"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
@@ -16,18 +17,21 @@ import (
"Open_IM/pkg/utils"
"context"
"errors"
- go_redis "github.com/go-redis/redis/v8"
- "github.com/golang/protobuf/proto"
"math/rand"
"strconv"
"strings"
"sync"
"time"
+
+ go_redis "github.com/go-redis/redis/v8"
+ "github.com/golang/protobuf/proto"
)
//When the number of group members is greater than this value,Online users will be sent first,Guaranteed service availability
const GroupMemberNum = 500
+var ExcludeContentType = []int{constant.HasReadReceipt, constant.GroupHasReadReceipt}
+
type MsgCallBackReq struct {
SendID string `json:"sendID"`
RecvID string `json:"recvID"`
@@ -69,19 +73,19 @@ func isMessageHasReadEnabled(pb *pbChat.SendMsgReq) (bool, int32, string) {
}
func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string) {
- if utils.IsContain(data.MsgData.SendID, config.Config.Manager.AppManagerUid) {
- return true, 0, "", nil
- }
- if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
- return true, 0, "", nil
- }
switch data.MsgData.SessionType {
case constant.SingleChatType:
+ if utils.IsContain(data.MsgData.SendID, config.Config.Manager.AppManagerUid) {
+ return true, 0, "", nil
+ }
+ if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
+ return true, 0, "", nil
+ }
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)
reqGetBlackIDListFromCache := &cacheRpc.GetBlackIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
if etcdConn == nil {
- errMsg := data.OperationID + "getcdv3.GetConn == nil"
+ errMsg := data.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(data.OperationID, errMsg)
return true, 0, "", nil
}
@@ -102,9 +106,9 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)
if config.Config.MessageVerify.FriendVerify {
reqGetFriendIDListFromCache := &cacheRpc.GetFriendIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
if etcdConn == nil {
- errMsg := data.OperationID + "getcdv3.GetConn == nil"
+ errMsg := data.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(data.OperationID, errMsg)
return true, 0, "", nil
}
@@ -128,34 +132,44 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
case constant.GroupChatType:
fallthrough
case constant.SuperGroupChatType:
- getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: data.OperationID, GroupID: data.MsgData.GroupID}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
- if etcdConn == nil {
- errMsg := data.OperationID + "getcdv3.GetConn == nil"
- log.NewError(data.OperationID, errMsg)
- //return returnMsg(&replay, pb, 201, errMsg, "", 0)
- return false, 201, errMsg, nil
- }
- client := pbCache.NewCacheClient(etcdConn)
- cacheResp, err := client.GetGroupMemberIDListFromCache(context.Background(), getGroupMemberIDListFromCacheReq)
+ groupInfo, err := rocksCache.GetGroupInfoFromCache(data.MsgData.GroupID)
if err != nil {
- log.NewError(data.OperationID, "GetGroupMemberIDListFromCache rpc call failed ", err.Error())
- //return returnMsg(&replay, pb, 201, "GetGroupMemberIDListFromCache failed", "", 0)
return false, 201, err.Error(), nil
}
- if cacheResp.CommonResp.ErrCode != 0 {
- log.NewError(data.OperationID, "GetGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
- //return returnMsg(&replay, pb, 201, "GetGroupMemberIDListFromCache logic failed", "", 0)
- return false, cacheResp.CommonResp.ErrCode, cacheResp.CommonResp.ErrMsg, nil
- }
- if !token_verify.IsManagerUserID(data.MsgData.SendID) {
- if !utils.IsContain(data.MsgData.SendID, cacheResp.UserIDList) {
- //return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
- return false, 202, "you are not in group", nil
+ if groupInfo.GroupType == constant.SuperGroup {
+ return true, 0, "", nil
+ } else {
+ getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: data.OperationID, GroupID: data.MsgData.GroupID}
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
+ if etcdConn == nil {
+ errMsg := data.OperationID + "getcdv3.GetDefaultConn == nil"
+ log.NewError(data.OperationID, errMsg)
+ //return returnMsg(&replay, pb, 201, errMsg, "", 0)
+ return false, 201, errMsg, nil
}
+ client := pbCache.NewCacheClient(etcdConn)
+ cacheResp, err := client.GetGroupMemberIDListFromCache(context.Background(), getGroupMemberIDListFromCacheReq)
+ if err != nil {
+ log.NewError(data.OperationID, "GetGroupMemberIDListFromCache rpc call failed ", err.Error())
+ //return returnMsg(&replay, pb, 201, "GetGroupMemberIDListFromCache failed", "", 0)
+ return false, 201, err.Error(), nil
+ }
+ if cacheResp.CommonResp.ErrCode != 0 {
+ log.NewError(data.OperationID, "GetGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
+ //return returnMsg(&replay, pb, 201, "GetGroupMemberIDListFromCache logic failed", "", 0)
+ return false, cacheResp.CommonResp.ErrCode, cacheResp.CommonResp.ErrMsg, nil
+ }
+ if !token_verify.IsManagerUserID(data.MsgData.SendID) {
+ if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
+ return true, 0, "", cacheResp.UserIDList
+ }
+ if !utils.IsContain(data.MsgData.SendID, cacheResp.UserIDList) {
+ //return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
+ return false, 202, "you are not in group", nil
+ }
+ }
+ return true, 0, "", cacheResp.UserIDList
}
- return true, 0, "", cacheResp.UserIDList
-
default:
return true, 0, "", nil
}
@@ -212,6 +226,7 @@ func (rpc *rpcChat) encapsulateMsgData(msg *sdk_ws.MsgData) {
func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.SendMsgResp, error) {
replay := pbChat.SendMsgResp{}
newTime := db.GetCurrentTimestampByMill()
+ t1 := time.Now()
log.Info(pb.OperationID, "rpc sendMsg come here ", pb.String())
flag, errCode, errMsg := isMessageHasReadEnabled(pb)
log.Info(pb.OperationID, "isMessageHasReadEnabled ", flag)
@@ -219,15 +234,18 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
return returnMsg(&replay, pb, errCode, errMsg, "", 0)
}
flag, errCode, errMsg, _ = messageVerification(pb)
- log.Info(pb.OperationID, "userRelationshipVerification ", flag)
+ log.Info(pb.OperationID, "messageVerification ", flag, " cost time: ", time.Since(t1))
if !flag {
return returnMsg(&replay, pb, errCode, errMsg, "", 0)
}
+ t1 = time.Now()
rpc.encapsulateMsgData(pb.MsgData)
+ log.Info(pb.OperationID, "encapsulateMsgData ", " cost time: ", time.Since(t1))
msgToMQSingle := pbChat.MsgDataToMQ{Token: pb.Token, OperationID: pb.OperationID, MsgData: pb.MsgData}
// callback
+ t1 = time.Now()
callbackResp := callbackWordFilter(pb)
- log.Info(pb.OperationID, "callbackWordFilter ", callbackResp)
+ log.Info(pb.OperationID, "callbackWordFilter ", callbackResp, "cost time: ", time.Since(t1))
if callbackResp.ErrCode != 0 {
log.Error(pb.OperationID, utils.GetSelfFuncName(), "callbackWordFilter resp: ", callbackResp)
}
@@ -242,7 +260,9 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
switch pb.MsgData.SessionType {
case constant.SingleChatType:
// callback
+ t1 = time.Now()
callbackResp := callbackBeforeSendSingleMsg(pb)
+ log.Info(pb.OperationID, "callbackBeforeSendSingleMsg ", " cost time: ", time.Since(t1))
if callbackResp.ErrCode != 0 {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackBeforeSendSingleMsg resp: ", callbackResp)
}
@@ -253,28 +273,37 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
log.NewDebug(pb.OperationID, utils.GetSelfFuncName(), "callbackBeforeSendSingleMsg result", "end rpc and return", callbackResp)
return returnMsg(&replay, pb, int32(callbackResp.ErrCode), callbackResp.ErrMsg, "", 0)
}
+ t1 = time.Now()
isSend := modifyMessageByUserMessageReceiveOpt(pb.MsgData.RecvID, pb.MsgData.SendID, constant.SingleChatType, pb)
+ log.Info(pb.OperationID, "modifyMessageByUserMessageReceiveOpt ", " cost time: ", time.Since(t1))
if isSend {
msgToMQSingle.MsgData = pb.MsgData
log.NewInfo(msgToMQSingle.OperationID, msgToMQSingle)
+ t1 = time.Now()
err1 := rpc.sendMsgToKafka(&msgToMQSingle, msgToMQSingle.MsgData.RecvID, constant.OnlineStatus)
+ log.Info(pb.OperationID, "sendMsgToKafka ", " cost time: ", time.Since(t1))
if err1 != nil {
log.NewError(msgToMQSingle.OperationID, "kafka send msg err :RecvID", msgToMQSingle.MsgData.RecvID, msgToMQSingle.String(), err1.Error())
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
}
}
if msgToMQSingle.MsgData.SendID != msgToMQSingle.MsgData.RecvID { //Filter messages sent to yourself
+ t1 = time.Now()
err2 := rpc.sendMsgToKafka(&msgToMQSingle, msgToMQSingle.MsgData.SendID, constant.OnlineStatus)
+ log.Info(pb.OperationID, "sendMsgToKafka ", " cost time: ", time.Since(t1))
if err2 != nil {
log.NewError(msgToMQSingle.OperationID, "kafka send msg err:SendID", msgToMQSingle.MsgData.SendID, msgToMQSingle.String())
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
}
}
// callback
+ t1 = time.Now()
callbackResp = callbackAfterSendSingleMsg(pb)
+ log.Info(pb.OperationID, "callbackAfterSendSingleMsg ", " cost time: ", time.Since(t1))
if callbackResp.ErrCode != 0 {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackAfterSendSingleMsg resp: ", callbackResp)
}
+ log.Debug(pb.OperationID, "send msg cost time all: ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
return returnMsg(&replay, pb, 0, "", msgToMQSingle.MsgData.ServerMsgID, msgToMQSingle.MsgData.SendTime)
case constant.GroupChatType:
// callback
@@ -321,7 +350,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
}
m := make(map[string][]string, 2)
m[constant.OnlineStatus] = memberUserIDList
- log.Debug(pb.OperationID, "send msg cost time1 ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
+ log.Debug(pb.OperationID, "send msg cost time1 ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID, pb)
newTime = db.GetCurrentTimestampByMill()
//split parallel send
@@ -386,9 +415,9 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
conversationReq.UserIDList = pb.MsgData.AtUserIDList
conversation.GroupAtType = constant.AtMe
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
if etcdConn == nil {
- errMsg := pb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := pb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(pb.OperationID, errMsg)
return
}
@@ -402,9 +431,9 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
if tag {
conversationReq.UserIDList = utils.DifferenceString(atUserID, memberUserIDList)
conversation.GroupAtType = constant.AtAll
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
if etcdConn == nil {
- errMsg := pb.OperationID + "getcdv3.GetConn == nil"
+ errMsg := pb.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(pb.OperationID, errMsg)
return
}
@@ -464,7 +493,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
}
// callback
- callbackResp = callbackAfterSendSingleMsg(pb)
+ callbackResp = callbackAfterSendGroupMsg(pb)
if callbackResp.ErrCode != 0 {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackAfterSendSuperGroupMsg resp: ", callbackResp)
}
@@ -535,6 +564,9 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i
case constant.ReceiveMessage:
return true
case constant.NotReceiveMessage:
+ if utils.IsContainInt(int(pb.MsgData.ContentType), ExcludeContentType) {
+ return true
+ }
return false
case constant.ReceiveNotNotifyMessage:
if pb.MsgData.Options == nil {
@@ -823,7 +855,7 @@ func Notification(n *NotificationMsg) {
unReadCount = config.Config.Notification.ConversationSetPrivate.Conversation.UnreadCount
case constant.DeleteMessageNotification:
reliabilityLevel = constant.ReliableNotificationNoMsg
- case constant.SuperGroupUpdateNotification:
+ case constant.ConversationUnreadNotification, constant.SuperGroupUpdateNotification:
reliabilityLevel = constant.UnreliableNotification
}
switch reliabilityLevel {
@@ -845,9 +877,9 @@ func Notification(n *NotificationMsg) {
offlineInfo.Ex = ex
msg.OfflinePushInfo = &offlineInfo
req.MsgData = &msg
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return
}
@@ -868,7 +900,7 @@ func getOnlineAndOfflineUserIDList(memberList []string, m map[string][]string, o
req.OperationID = operationID
req.OpUserID = config.Config.Manager.AppManagerUid[0]
flag := false
- grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
+ grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
for _, v := range grpcCons {
client := pbRelay.NewRelayClient(v)
reply, err := client.GetUsersOnlineStatus(context.Background(), req)
@@ -956,8 +988,17 @@ func (rpc *rpcChat) sendMsgToGroup(list []string, pb pbChat.SendMsgReq, status s
func (rpc *rpcChat) sendMsgToGroupOptimization(list []string, groupPB *pbChat.SendMsgReq, status string, sendTag *bool, wg *sync.WaitGroup) {
msgToMQGroup := pbChat.MsgDataToMQ{Token: groupPB.Token, OperationID: groupPB.OperationID, MsgData: groupPB.MsgData}
+ tempOptions := make(map[string]bool, 1)
+ for k, v := range groupPB.MsgData.Options {
+ tempOptions[k] = v
+ }
for _, v := range list {
groupPB.MsgData.RecvID = v
+ options := make(map[string]bool, 1)
+ for k, v := range tempOptions {
+ options[k] = v
+ }
+ groupPB.MsgData.Options = options
isSend := modifyMessageByUserMessageReceiveOpt(v, groupPB.MsgData.GroupID, constant.GroupChatType, groupPB)
if isSend {
if v == "" || groupPB.MsgData.SendID == "" {
diff --git a/internal/rpc/msg/tag_send_msg.go b/internal/rpc/msg/tag_send_msg.go
index eb3a60695..0783d740e 100644
--- a/internal/rpc/msg/tag_send_msg.go
+++ b/internal/rpc/msg/tag_send_msg.go
@@ -33,9 +33,9 @@ func TagSendMessage(operationID string, user *db.User, recvID, content string, s
msgData.SenderPlatformID = senderPlatformID
req.MsgData = &msgData
req.OperationID = operationID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return
}
diff --git a/internal/rpc/office/office.go b/internal/rpc/office/office.go
index ace207322..828d8b58c 100644
--- a/internal/rpc/office/office.go
+++ b/internal/rpc/office/office.go
@@ -205,9 +205,9 @@ func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagR
}
var groupUserIDList []string
for _, groupID := range req.GroupList {
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
resp.CommonResp.ErrCode = constant.ErrInternal.ErrCode
resp.CommonResp.ErrMsg = errMsg
diff --git a/internal/rpc/organization/organization.go b/internal/rpc/organization/organization.go
index a3b0301a6..95f3233ef 100644
--- a/internal/rpc/organization/organization.go
+++ b/internal/rpc/organization/organization.go
@@ -119,9 +119,9 @@ func (s *organizationServer) CreateDepartment(ctx context.Context, req *rpc.Crea
return &rpc.CreateDepartmentResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
}
chat.OrganizationNotificationToAll(req.OpUserID, req.OperationID)
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
resp.ErrCode = constant.ErrInternal.ErrCode
resp.ErrMsg = errMsg
@@ -262,9 +262,9 @@ func (s *organizationServer) CreateOrganizationUser(ctx context.Context, req *rp
utils.CopyStructFields(authReq.UserInfo, req.OrganizationUser)
authReq.OperationID = req.OperationID
if req.IsRegister {
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &rpc.CreateOrganizationUserResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
@@ -305,31 +305,8 @@ func (s *organizationServer) CreateOrganizationUser(ctx context.Context, req *rp
}
func (s *organizationServer) UpdateOrganizationUser(ctx context.Context, req *rpc.UpdateOrganizationUserReq) (*rpc.UpdateOrganizationUserResp, error) {
- authReq := &pbAuth.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
- utils.CopyStructFields(authReq.UserInfo, req.OrganizationUser)
- authReq.OperationID = req.OperationID
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
- if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
- log.NewError(req.OperationID, errMsg)
- return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
- }
- client := pbAuth.NewAuthClient(etcdConn)
-
- reply, err := client.UserRegister(context.Background(), authReq)
- if err != nil {
- errMsg := "UserRegister failed " + err.Error()
- log.NewError(req.OperationID, errMsg)
- return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
- }
- if reply.CommonResp.ErrCode != 0 {
- errMsg := "UserRegister failed " + reply.CommonResp.ErrMsg
- log.NewError(req.OperationID, errMsg)
- return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
- }
-
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
- if !token_verify.IsManagerUserID(req.OpUserID) {
+ if !token_verify.IsManagerUserID(req.OpUserID) && req.OpUserID != req.OrganizationUser.UserID {
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
log.Error(req.OperationID, errMsg)
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
@@ -342,7 +319,7 @@ func (s *organizationServer) UpdateOrganizationUser(ctx context.Context, req *rp
}
log.Debug(req.OperationID, "src ", *req.OrganizationUser, "dst ", organizationUser)
- err = imdb.UpdateOrganizationUser(&organizationUser, nil)
+ err := imdb.UpdateOrganizationUser(&organizationUser, nil)
if err != nil {
errMsg := req.OperationID + " " + "CreateOrganizationUser failed " + err.Error()
log.Error(req.OperationID, errMsg, organizationUser)
diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go
index 47f6036bf..a7d7934ca 100644
--- a/internal/rpc/user/user.go
+++ b/internal/rpc/user/user.go
@@ -6,12 +6,14 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
- "Open_IM/pkg/common/db/rocks_cache"
+ rocksCache "Open_IM/pkg/common/db/rocks_cache"
errors "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
+ pbConversation "Open_IM/pkg/proto/conversation"
pbFriend "Open_IM/pkg/proto/friend"
+ pbOrganization "Open_IM/pkg/proto/organization"
sdkws "Open_IM/pkg/proto/sdk_ws"
pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
@@ -19,6 +21,7 @@ import (
"net"
"strconv"
"strings"
+ "time"
"google.golang.org/grpc"
)
@@ -83,7 +86,7 @@ func (s *userServer) Run() {
log.NewInfo("0", "rpc user success")
}
-func syncPeerUserConversation(conversation *pbUser.Conversation, operationID string) error {
+func syncPeerUserConversation(conversation *pbConversation.Conversation, operationID string) error {
peerUserConversation := db.Conversation{
OwnerUserID: conversation.UserID,
ConversationID: utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType),
@@ -109,6 +112,7 @@ func syncPeerUserConversation(conversation *pbUser.Conversation, operationID str
func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) {
log.NewInfo(req.OperationID, "GetUserInfo args ", req.String())
+
var userInfoList []*sdkws.UserInfo
if len(req.UserIDList) > 0 {
for _, userID := range req.UserIDList {
@@ -146,11 +150,21 @@ func (s *userServer) BatchSetConversations(ctx context.Context, req *pbUser.Batc
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
- if err := imdb.SetConversation(conversation); err != nil {
+
+ isUpdate, err := imdb.SetConversation(conversation)
+ if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
resp.Failed = append(resp.Failed, v.ConversationID)
continue
}
+ if isUpdate {
+ err = rocksCache.DelConversationFromCache(v.OwnerUserID, v.ConversationID)
+ } else {
+ err = rocksCache.DelUserConversationIDListFromCache(v.OwnerUserID)
+ }
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), v.ConversationID, v.OwnerUserID)
+ }
resp.Success = append(resp.Success, v.ConversationID)
// if is set private msg operation,then peer user need to sync and set tips\
if v.ConversationType == constant.SingleChatType && req.NotificationType == constant.ConversationPrivateChatNotification {
@@ -167,8 +181,8 @@ func (s *userServer) BatchSetConversations(ctx context.Context, req *pbUser.Batc
func (s *userServer) GetAllConversations(ctx context.Context, req *pbUser.GetAllConversationsReq) (*pbUser.GetAllConversationsResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp := &pbUser.GetAllConversationsResp{Conversations: []*pbUser.Conversation{}}
- conversations, err := imdb.GetUserAllConversations(req.OwnerUserID)
+ resp := &pbUser.GetAllConversationsResp{Conversations: []*pbConversation.Conversation{}}
+ conversations, err := rocksCache.GetUserAllConversationList(req.OwnerUserID)
log.NewDebug(req.OperationID, "conversations: ", conversations)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversations error", err.Error())
@@ -185,8 +199,8 @@ func (s *userServer) GetAllConversations(ctx context.Context, req *pbUser.GetAll
func (s *userServer) GetConversation(ctx context.Context, req *pbUser.GetConversationReq) (*pbUser.GetConversationResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp := &pbUser.GetConversationResp{Conversation: &pbUser.Conversation{}}
- conversation, err := imdb.GetConversation(req.OwnerUserID, req.ConversationID)
+ resp := &pbUser.GetConversationResp{Conversation: &pbConversation.Conversation{}}
+ conversation, err := rocksCache.GetConversationFromCache(req.OwnerUserID, req.ConversationID)
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversation error", err.Error())
@@ -203,8 +217,8 @@ func (s *userServer) GetConversation(ctx context.Context, req *pbUser.GetConvers
func (s *userServer) GetConversations(ctx context.Context, req *pbUser.GetConversationsReq) (*pbUser.GetConversationsResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
- resp := &pbUser.GetConversationsResp{Conversations: []*pbUser.Conversation{}}
- conversations, err := imdb.GetConversations(req.OwnerUserID, req.ConversationIDs)
+ resp := &pbUser.GetConversationsResp{Conversations: []*pbConversation.Conversation{}}
+ conversations, err := rocksCache.GetConversationsFromCache(req.OwnerUserID, req.ConversationIDs)
log.NewDebug("", utils.GetSelfFuncName(), "conversations", conversations)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversations error", err.Error())
@@ -248,12 +262,21 @@ func (s *userServer) SetConversation(ctx context.Context, req *pbUser.SetConvers
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
- err := imdb.SetConversation(conversation)
+ isUpdate, err := imdb.SetConversation(conversation)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
+ if isUpdate {
+ err = rocksCache.DelConversationFromCache(req.Conversation.OwnerUserID, req.Conversation.ConversationID)
+ } else {
+ err = rocksCache.DelUserConversationIDListFromCache(req.Conversation.OwnerUserID)
+ }
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.Conversation.ConversationID, req.Conversation.OwnerUserID)
+ }
+
// notification
if req.Conversation.ConversationType == constant.SingleChatType && req.NotificationType == constant.ConversationPrivateChatNotification {
//sync peer user conversation if conversation is singleChatType
@@ -293,12 +316,20 @@ func (s *userServer) SetRecvMsgOpt(ctx context.Context, req *pbUser.SetRecvMsgOp
conversation.ConversationType = constant.GroupChatType
}
}
- err := imdb.SetRecvMsgOpt(conversation)
+ isUpdate, err := imdb.SetRecvMsgOpt(conversation)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
+ if isUpdate {
+ err = rocksCache.DelConversationFromCache(conversation.OwnerUserID, conversation.ConversationID)
+ } else {
+ err = rocksCache.DelUserConversationIDListFromCache(conversation.OwnerUserID)
+ }
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), conversation.ConversationID, err.Error())
+ }
chat.ConversationChangeNotification(req.OperationID, req.OwnerUserID)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
resp.CommonResp = &pbUser.CommonResp{}
@@ -397,9 +428,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
log.NewError(req.OperationID, "UpdateUserInfo failed ", err.Error(), user)
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
- etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
+ etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
if etcdConn == nil {
- errMsg := req.OperationID + "getcdv3.GetConn == nil"
+ errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}}, nil
}
@@ -430,21 +461,31 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
if req.UserInfo.Nickname != "" {
go s.SyncJoinedGroupMemberNickname(req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, req.OperationID, req.OpUserID)
}
- //updateUserInfoToCacheReq := &cache.UpdateUserInfoToCacheReq{
- // OperationID: req.OperationID,
- // UserInfoList: []*sdkws.UserInfo{req.UserInfo},
- //}
- //cacheEtcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
- //cacheClient := cache.NewCacheClient(cacheEtcdConn)
- //resp, err := cacheClient.UpdateUserInfoToCache(context.Background(), updateUserInfoToCacheReq)
- //if err != nil {
- // log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), updateUserInfoToCacheReq.String())
- // return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: err.Error()}}, nil
- //}
- //if resp.CommonResp.ErrCode != 0 {
- // log.NewError(req.OperationID, utils.GetSelfFuncName(), resp.String())
- // return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: resp.CommonResp.ErrMsg}}, nil
- //}
+ etcdConn = getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
+ clientOrg := pbOrganization.NewOrganizationClient(etcdConn)
+ out, err := clientOrg.UpdateOrganizationUser(context.Background(), &pbOrganization.UpdateOrganizationUserReq{
+ OrganizationUser: &sdkws.OrganizationUser{
+ UserID: req.UserInfo.UserID,
+ Nickname: req.UserInfo.Nickname,
+ EnglishName: req.UserInfo.Nickname,
+ FaceURL: req.UserInfo.FaceURL,
+ Gender: req.UserInfo.Gender,
+ Mobile: req.UserInfo.PhoneNumber,
+ Telephone: req.UserInfo.PhoneNumber,
+ Birth: req.UserInfo.Birth,
+ Email: req.UserInfo.Email,
+ Ex: req.UserInfo.Ex,
+ },
+ OperationID: req.OperationID,
+ OpUserID: req.OpUserID,
+ })
+ if err != nil {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateOrganizationUser failed", err.Error())
+ } else {
+ if out.ErrCode != 0 {
+ log.NewError(req.OperationID, utils.GetSelfFuncName(), "grpc resp: ", out)
+ }
+ }
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil
}
func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.SetGlobalRecvMessageOptReq) (*pbUser.SetGlobalRecvMessageOptResp, error) {
@@ -466,6 +507,10 @@ func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.Se
log.NewError(req.OperationID, "SetGlobalRecvMessageOpt failed ", err.Error(), user)
return &pbUser.SetGlobalRecvMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
+ if err := rocksCache.DelUserInfoFromCache(user.UserID); err != nil {
+ log.NewError(req.OperationID, "DelUserInfoFromCache failed ", err.Error(), req.String())
+ return &pbUser.SetGlobalRecvMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}}, nil
+ }
chat.UserInfoUpdatedNotification(req.OperationID, req.UserID, req.UserID)
return &pbUser.SetGlobalRecvMessageOptResp{CommonResp: &pbUser.CommonResp{}}, nil
}
@@ -482,8 +527,12 @@ func (s *userServer) SyncJoinedGroupMemberFaceURL(userID string, faceURL string,
log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupMemberInfo)
continue
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(groupID); err != nil {
- log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID)
+ //if err := rocksCache.DelAllGroupMembersInfoFromCache(groupID); err != nil {
+ // log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID)
+ // continue
+ //}
+ if err := rocksCache.DelGroupMemberInfoFromCache(groupID, userID); err != nil {
+ log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID, userID)
continue
}
chat.GroupMemberInfoSetNotification(operationID, opUserID, groupID, userID)
@@ -508,9 +557,12 @@ func (s *userServer) SyncJoinedGroupMemberNickname(userID string, newNickname, o
log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupMemberInfo)
continue
}
- if err := rocksCache.DelAllGroupMembersInfoFromCache(v); err != nil {
+ //if err := rocksCache.DelAllGroupMembersInfoFromCache(v); err != nil {
+ // log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), v)
+ // continue
+ //}
+ if err := rocksCache.DelGroupMemberInfoFromCache(v, userID); err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), v)
- continue
}
chat.GroupMemberInfoSetNotification(operationID, opUserID, v, userID)
}
@@ -532,11 +584,20 @@ func (s *userServer) GetUsersByName(ctx context.Context, req *pbUser.GetUsersByN
continue
}
resp.Users = append(resp.Users, &pbUser.User{
- ProfilePhoto: user.FaceURL,
- Nickname: user.Nickname,
- UserId: user.UserID,
- CreateTime: user.CreateTime.String(),
- IsBlock: isBlock,
+ ProfilePhoto: user.FaceURL,
+ Nickname: user.Nickname,
+ UserId: user.UserID,
+ CreateTime: user.CreateTime.Format("2006-01-02 15:04:05"),
+ CreateIp: user.CreateIp,
+ IsBlock: isBlock,
+ Birth: user.Birth.Format("2006-01-02"),
+ PhoneNumber: user.PhoneNumber,
+ Email: user.Email,
+ LastLoginIp: user.LastLoginIp,
+ LastLoginTime: user.LastLoginTime.Format("2006-01-02 15:04:05"),
+ LoginTimes: user.LoginTimes,
+ Gender: user.Gender,
+ LoginLimit: user.LoginLimit,
})
}
user := db.User{Nickname: req.UserName}
@@ -568,11 +629,20 @@ func (s *userServer) GetUserById(ctx context.Context, req *pbUser.GetUserByIdReq
return resp, errors.WrapError(constant.ErrDB)
}
resp.User = &pbUser.User{
- ProfilePhoto: user.FaceURL,
- Nickname: user.Nickname,
- UserId: user.UserID,
- CreateTime: user.CreateTime.String(),
- IsBlock: isBlock,
+ ProfilePhoto: user.FaceURL,
+ Nickname: user.Nickname,
+ UserId: user.UserID,
+ CreateTime: user.CreateTime.Format("2006-01-02 15:04:05"),
+ CreateIp: user.CreateIp,
+ IsBlock: isBlock,
+ Birth: user.Birth.Format("2006-01-02"),
+ PhoneNumber: user.PhoneNumber,
+ Email: user.Email,
+ LastLoginIp: user.LastLoginIp,
+ LastLoginTime: user.LastLoginTime.Format("2006-01-02 15:04:05"),
+ LoginTimes: user.LoginTimes,
+ Gender: user.Gender,
+ LoginLimit: user.LoginLimit,
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@@ -586,15 +656,32 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUsers failed", err.Error())
return resp, errors.WrapError(constant.ErrDB)
}
+
for _, v := range users {
isBlock, err := imdb.UserIsBlock(v.UserID)
if err == nil {
+ registerIP := ""
+ registerInfo, err := imdb.GetRegisterInfo(v.UserID)
+ if registerInfo != nil && err == nil {
+ registerIP = registerInfo.RegisterIP
+ }
+
user := &pbUser.User{
- ProfilePhoto: v.FaceURL,
- UserId: v.UserID,
- CreateTime: v.CreateTime.String(),
- Nickname: v.Nickname,
- IsBlock: isBlock,
+ ProfilePhoto: v.FaceURL,
+ UserId: v.UserID,
+ CreateTime: v.CreateTime.Format("2006-01-02 15:04:05"),
+ CreateIp: v.CreateIp,
+ Nickname: v.Nickname,
+ Birth: v.Birth.Format("2006-01-02"),
+ PhoneNumber: v.PhoneNumber,
+ Email: v.Email,
+ IsBlock: isBlock,
+ LastLoginIp: v.LastLoginIp,
+ LastLoginTime: v.LastLoginTime.Format("2006-01-02 15:04:05"),
+ LoginTimes: v.LoginTimes,
+ Gender: v.Gender,
+ LoginLimit: v.LoginLimit,
+ RegisterIp: registerIP,
}
resp.User = append(resp.User, user)
} else {
@@ -621,11 +708,19 @@ func (s *userServer) ResignUser(ctx context.Context, req *pbUser.ResignUserReq)
func (s *userServer) AlterUser(ctx context.Context, req *pbUser.AlterUserReq) (*pbUser.AlterUserResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbUser.AlterUserResp{}
+ birth, _ := time.ParseInLocation("2006-01-02", req.Birth, time.Local)
+ gender, gendererr := strconv.Atoi(req.Gender)
+ if gendererr != nil {
+ gender = 0
+ }
user := db.User{
- PhoneNumber: strconv.FormatInt(req.PhoneNumber, 10),
+ PhoneNumber: req.PhoneNumber,
Nickname: req.Nickname,
Email: req.Email,
UserID: req.UserId,
+ Gender: int32(gender),
+ FaceURL: req.Photo,
+ Birth: birth,
}
if err := imdb.UpdateUserInfo(user); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateUserInfo", err.Error())
@@ -639,7 +734,7 @@ func (s *userServer) AlterUser(ctx context.Context, req *pbUser.AlterUserReq) (*
func (s *userServer) AddUser(ctx context.Context, req *pbUser.AddUserReq) (*pbUser.AddUserResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbUser.AddUserResp{}
- err := imdb.AddUser(req.UserId, req.PhoneNumber, req.Name)
+ err := imdb.AddUser(req.UserId, req.PhoneNumber, req.Name, req.Email, req.Gender, req.Photo, req.Birth)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddUser", err.Error())
return resp, errors.WrapError(constant.ErrDB)
@@ -684,6 +779,10 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser
Nickname: v.User.Nickname,
UserId: v.User.UserID,
IsBlock: true,
+ Birth: v.User.Birth.Format("2006-01-02"),
+ PhoneNumber: v.User.PhoneNumber,
+ Email: v.User.Email,
+ Gender: v.User.Gender,
},
BeginDisableTime: (v.BeginDisableTime).String(),
EndDisableTime: (v.EndDisableTime).String(),
@@ -716,6 +815,10 @@ func (s *userServer) GetBlockUserById(_ context.Context, req *pbUser.GetBlockUse
Nickname: user.User.Nickname,
UserId: user.User.UserID,
IsBlock: true,
+ Birth: user.User.Birth.Format("2006-01-02"),
+ PhoneNumber: user.User.PhoneNumber,
+ Email: user.User.Email,
+ Gender: user.User.Gender,
},
BeginDisableTime: (user.BeginDisableTime).String(),
EndDisableTime: (user.EndDisableTime).String(),
diff --git a/internal/timed_task/init.go b/internal/timed_task/init.go
deleted file mode 100644
index 8ee5d9452..000000000
--- a/internal/timed_task/init.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package timed_task
-
-type TimeTask struct {
- delMgoChatChan chan bool
-}
-
-var timeTask TimeTask
-
-func GetInstance() *TimeTask {
- if timeTask.delMgoChatChan == nil {
- timeTask.delMgoChatChan = make(chan bool)
- go func() {
- timeTask.delMgoChatChan <- true
- }()
- }
- return &timeTask
-}
-
-func (t *TimeTask) Run() {
- for {
- select {
- case <-t.delMgoChatChan:
- t.timedDeleteUserChat()
- }
- }
-}
diff --git a/internal/timed_task/timed_task.go b/internal/timed_task/timed_task.go
deleted file mode 100644
index 5b0264123..000000000
--- a/internal/timed_task/timed_task.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package timed_task
-
-import (
- "Open_IM/pkg/common/db"
- "time"
-)
-
-func (t *TimeTask) timedDeleteUserChat() {
- now := time.Now()
- next := now.Add(time.Hour * 24)
- next = time.Date(next.Year(), next.Month(), next.Day(), 0, 0, 0, 0, next.Location())
- tm := time.NewTimer(next.Sub(now))
-
- <-tm.C
-
- count, _ := db.DB.MgoUserCount()
- for i := 0; i < count; i++ {
- time.Sleep(10 * time.Millisecond)
- uid, _ := db.DB.MgoSkipUID(i)
- db.DB.DelUserChatMongo2(uid)
- }
-
- go func() {
- t.delMgoChatChan <- true
- }()
-}
diff --git a/pkg/base_info/auth_api_struct.go b/pkg/base_info/auth_api_struct.go
index 3b2fb2b13..85aa2301e 100644
--- a/pkg/base_info/auth_api_struct.go
+++ b/pkg/base_info/auth_api_struct.go
@@ -28,8 +28,9 @@ type UserRegisterResp struct {
type UserTokenReq struct {
Secret string `json:"secret" binding:"required,max=32"`
- Platform int32 `json:"platform" binding:"required,min=1,max=8"`
+ Platform int32 `json:"platform" binding:"required,min=1,max=9"`
UserID string `json:"userID" binding:"required,min=1,max=64"`
+ LoginIp string `json:"loginIp"`
OperationID string `json:"operationID" binding:"required"`
}
@@ -39,7 +40,7 @@ type UserTokenResp struct {
}
type ForceLogoutReq struct {
- Platform int32 `json:"platform" binding:"required,min=1,max=8"`
+ Platform int32 `json:"platform" binding:"required,min=1,max=9"`
FromUserID string `json:"fromUserID" binding:"required,min=1,max=64"`
OperationID string `json:"operationID" binding:"required"`
}
diff --git a/pkg/base_info/client_init.go b/pkg/base_info/client_init.go
new file mode 100644
index 000000000..47cfdcdea
--- /dev/null
+++ b/pkg/base_info/client_init.go
@@ -0,0 +1,21 @@
+package base_info
+
+type SetClientInitConfigReq struct {
+ OperationID string `json:"operationID" binding:"required"`
+ DiscoverPageURL *string `json:"discoverPageURL"`
+}
+
+type SetClientInitConfigResp struct {
+ CommResp
+}
+
+type GetClientInitConfigReq struct {
+ OperationID string `json:"operationID" binding:"required"`
+}
+
+type GetClientInitConfigResp struct {
+ CommResp
+ Data struct {
+ DiscoverPageURL string `json:"discoverPageURL"`
+ } `json:"data"`
+}
diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go
index 30890f7eb..be913a3c0 100644
--- a/pkg/base_info/conversation_api_struct.go
+++ b/pkg/base_info/conversation_api_struct.go
@@ -33,20 +33,21 @@ type SetReceiveMessageOptResp struct {
}
type Conversation struct {
- OwnerUserID string `json:"ownerUserID" binding:"required"`
- ConversationID string `json:"conversationID" binding:"required"`
- ConversationType int32 `json:"conversationType" binding:"required"`
- UserID string `json:"userID"`
- GroupID string `json:"groupID"`
- RecvMsgOpt int32 `json:"recvMsgOpt" binding:"omitempty,oneof=0 1 2"`
- UnreadCount int32 `json:"unreadCount" binding:"omitempty"`
- DraftTextTime int64 `json:"draftTextTime"`
- IsPinned bool `json:"isPinned" binding:"omitempty"`
- IsPrivateChat bool `json:"isPrivateChat"`
- GroupAtType int32 `json:"groupAtType"`
- IsNotInGroup bool `json:"isNotInGroup"`
- AttachedInfo string `json:"attachedInfo"`
- Ex string `json:"ex"`
+ OwnerUserID string `json:"ownerUserID" binding:"required"`
+ ConversationID string `json:"conversationID" binding:"required"`
+ ConversationType int32 `json:"conversationType" binding:"required"`
+ UserID string `json:"userID"`
+ GroupID string `json:"groupID"`
+ RecvMsgOpt int32 `json:"recvMsgOpt" binding:"omitempty,oneof=0 1 2"`
+ UnreadCount int32 `json:"unreadCount" binding:"omitempty"`
+ DraftTextTime int64 `json:"draftTextTime"`
+ IsPinned bool `json:"isPinned" binding:"omitempty"`
+ IsPrivateChat bool `json:"isPrivateChat"`
+ GroupAtType int32 `json:"groupAtType"`
+ IsNotInGroup bool `json:"isNotInGroup"`
+ UpdateUnreadCountTime int64 `json:"updateUnreadCountTime"`
+ AttachedInfo string `json:"attachedInfo"`
+ Ex string `json:"ex"`
}
type SetConversationReq struct {
diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go
index 09a164e42..8f2eaccd4 100644
--- a/pkg/base_info/group_api_struct.go
+++ b/pkg/base_info/group_api_struct.go
@@ -73,6 +73,8 @@ type GetGroupMemberListResp struct {
type GetGroupAllMemberReq struct {
GroupID string `json:"groupID" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
+ Offset int32 `json:"offset"`
+ Count int32 `json:"count"`
}
type GetGroupAllMemberResp struct {
CommResp
@@ -80,6 +82,19 @@ type GetGroupAllMemberResp struct {
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
+//
+//type GetGroupAllMemberListBySplitReq struct {
+// GroupID string `json:"groupID" binding:"required"`
+// OperationID string `json:"operationID" binding:"required"`
+// Offset int32 `json:"offset" binding:"required"`
+// Count int32 `json:"count" binding:"required"`
+//}
+//type GetGroupAllMemberListBySplitResp struct {
+// CommResp
+// MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
+// Data []map[string]interface{} `json:"data" swaggerignore:"true"`
+//}
+
type CreateGroupReq struct {
MemberList []*GroupAddMemberInfo `json:"memberList"`
OwnerUserID string `json:"ownerUserID"`
@@ -188,7 +203,7 @@ type SetGroupInfoReq struct {
FaceURL string `json:"faceURL"`
Ex string `json:"ex"`
OperationID string `json:"operationID" binding:"required"`
- NeedVerification *int32 `json:"needVerification" `
+ NeedVerification *int32 `json:"needVerification"`
LookMemberInfo *int32 `json:"lookMemberInfo"`
ApplyMemberFriend *int32 `json:"applyMemberFriend"`
}
@@ -274,3 +289,14 @@ type SetGroupMemberInfoReq struct {
type SetGroupMemberInfoResp struct {
CommResp
}
+
+type GetGroupAbstractInfoReq struct {
+ OperationID string `json:"operationID"`
+ GroupID string `json:"groupID"`
+}
+
+type GetGroupAbstractInfoResp struct {
+ CommResp
+ GroupMemberNumber int32 `json:"groupMemberNumber"`
+ GroupMemberListHash uint64 `json:"groupMemberListHash"`
+}
diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go
index 7d9f43653..cc7ba5129 100644
--- a/pkg/base_info/manage_api_struct.go
+++ b/pkg/base_info/manage_api_struct.go
@@ -2,8 +2,7 @@ package base_info
import (
pbRelay "Open_IM/pkg/proto/relay"
- "Open_IM/pkg/proto/sdk_ws"
- open_im_sdk "Open_IM/pkg/proto/sdk_ws"
+ server_api_params "Open_IM/pkg/proto/sdk_ws"
pbUser "Open_IM/pkg/proto/user"
)
@@ -48,12 +47,12 @@ type ManagementSendMsg struct {
SenderFaceURL string `json:"senderFaceURL" `
SenderPlatformID int32 `json:"senderPlatformID"`
//ForceList []string `json:"forceList" `
- Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"`
- ContentType int32 `json:"contentType" binding:"required"`
- SessionType int32 `json:"sessionType" binding:"required"`
- IsOnlineOnly bool `json:"isOnlineOnly"`
- NotOfflinePush bool `json:"notOfflinePush"`
- OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"`
+ Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"`
+ ContentType int32 `json:"contentType" binding:"required"`
+ SessionType int32 `json:"sessionType" binding:"required"`
+ IsOnlineOnly bool `json:"isOnlineOnly"`
+ NotOfflinePush bool `json:"notOfflinePush"`
+ OfflinePushInfo *server_api_params.OfflinePushInfo `json:"offlinePushInfo"`
}
type ManagementSendMsgReq struct {
@@ -68,6 +67,7 @@ type ManagementSendMsgResp struct {
type ManagementBatchSendMsgReq struct {
ManagementSendMsg
+ IsSendAll bool `json:"isSendAll"`
RecvIDList []string `json:"recvIDList"`
}
diff --git a/pkg/base_info/pagination.go b/pkg/base_info/pagination.go
new file mode 100644
index 000000000..d73725632
--- /dev/null
+++ b/pkg/base_info/pagination.go
@@ -0,0 +1,6 @@
+package base_info
+
+type Pagination struct {
+ PageNumber int32 `json:"pageNumber" binding:"required"`
+ ShowNumber int32 `json:"showNumber" binding:"required"`
+}
diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go
index e00be850d..5df606b28 100644
--- a/pkg/base_info/public_struct.go
+++ b/pkg/base_info/public_struct.go
@@ -1,19 +1,27 @@
package base_info
import (
- "github.com/gin-gonic/gin"
"net/http"
+
+ "github.com/gin-gonic/gin"
)
type ApiUserInfo struct {
- UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"`
- Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"`
- FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
- Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
- PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
- Birth uint32 `json:"birth" binding:"omitempty"`
- Email string `json:"email" binding:"omitempty,max=64"`
- Ex string `json:"ex" binding:"omitempty,max=1024"`
+ UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"`
+ Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"`
+ FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
+ Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
+ PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
+ Birth uint32 `json:"birth" binding:"omitempty"`
+ Email string `json:"email" binding:"omitempty,max=64"`
+ CreateIp string `json:"createIp" binding:"omitempty,max=15"`
+ CreateTime int64 `json:"createTime"`
+ LastLoginIp string `json:"LastLoginIp" binding:"omitempty,max=15"`
+ LastLoginTime int64 `json:"lastLoginTime"`
+ LoginTimes int32 `json:"loginTimes" binding:"omitempty"`
+ LoginLimit int32 `json:"loginLimit" binding:"omitempty"`
+ Ex string `json:"ex" binding:"omitempty,max=1024"`
+ InvitationCode string `json:"invitationCode" binding:"omitempty"`
}
//type Conversation struct {
diff --git a/pkg/base_info/third_api_struct.go b/pkg/base_info/third_api_struct.go
index 8785ecd37..3933572ce 100644
--- a/pkg/base_info/third_api_struct.go
+++ b/pkg/base_info/third_api_struct.go
@@ -7,12 +7,13 @@ type MinioStorageCredentialReq struct {
}
type MiniostorageCredentialResp struct {
- SecretAccessKey string `json:"secretAccessKey"`
- AccessKeyID string `json:"accessKeyID"`
- SessionToken string `json:"sessionToken"`
- BucketName string `json:"bucketName"`
- StsEndpointURL string `json:"stsEndpointURL"`
- StorageTime int `json:"storageTime"`
+ SecretAccessKey string `json:"secretAccessKey"`
+ AccessKeyID string `json:"accessKeyID"`
+ SessionToken string `json:"sessionToken"`
+ BucketName string `json:"bucketName"`
+ StsEndpointURL string `json:"stsEndpointURL"`
+ StorageTime int `json:"storageTime"`
+ IsDistributedMod bool `json:"isDistributedMod"`
}
type MinioUploadFileReq struct {
@@ -98,3 +99,16 @@ type GetRTCInvitationInfoStartAppReq struct {
type GetRTCInvitationInfoStartAppResp struct {
GetRTCInvitationInfoResp
}
+
+/**
+ * FCM第三方上报Token
+ */
+type FcmUpdateTokenReq struct {
+ OperationID string `json:"operationID" binding:"required"`
+ Platform int `json:"platform" binding:"required,min=1,max=2"` //only for ios + android
+ FcmToken string `json:"fcmToken" binding:"required"`
+}
+
+type FcmUpdateTokenResp struct {
+ CommResp
+}
diff --git a/pkg/call_back_struct/common.go b/pkg/call_back_struct/common.go
index acbfced6d..c3e5a4a71 100644
--- a/pkg/call_back_struct/common.go
+++ b/pkg/call_back_struct/common.go
@@ -14,8 +14,10 @@ type CommonCallbackReq struct {
Status int32 `json:"status"`
CreateTime int64 `json:"createTime"`
Content string `json:"content"`
+ Seq uint32 `json:"seq"`
AtUserIDList []string `json:"atUserList"`
SenderFaceURL string `json:"faceURL"`
+ Ex string `json:"ex"`
}
type CommonCallbackResp struct {
diff --git a/pkg/call_back_struct/msg_gateway.go b/pkg/call_back_struct/msg_gateway.go
index 2fba45114..5dbf9809b 100644
--- a/pkg/call_back_struct/msg_gateway.go
+++ b/pkg/call_back_struct/msg_gateway.go
@@ -18,3 +18,12 @@ type CallbackUserOfflineReq struct {
type CallbackUserOfflineResp struct {
CommonCallbackResp
}
+
+type CallbackUserKickOffReq struct {
+ UserStatusCallbackReq
+ Seq int `json:"seq"`
+}
+
+type CallbackUserKickOffResp struct {
+ CommonCallbackResp
+}
diff --git a/pkg/call_back_struct/push.go b/pkg/call_back_struct/push.go
index e3803a0e2..6ff649a3d 100644
--- a/pkg/call_back_struct/push.go
+++ b/pkg/call_back_struct/push.go
@@ -15,7 +15,8 @@ type CallbackBeforePushReq struct {
type CallbackBeforePushResp struct {
*CommonCallbackResp
- UserIDList []string `json:"userIDList"`
+ UserIDList []string `json:"userIDList"`
+ OfflinePushInfo *commonPb.OfflinePushInfo `json:"offlinePushInfo"`
}
type CallbackBeforeSuperGroupOnlinePushReq struct {
diff --git a/pkg/cms_api_struct/admin.go b/pkg/cms_api_struct/admin.go
index 02463f6e5..81048719b 100644
--- a/pkg/cms_api_struct/admin.go
+++ b/pkg/cms_api_struct/admin.go
@@ -1,8 +1,6 @@
package cms_api_struct
-import (
- apiStruct "Open_IM/pkg/base_info"
-)
+import server_api_params "Open_IM/pkg/proto/sdk_ws"
type AdminLoginRequest struct {
AdminName string `json:"admin_name" binding:"required"`
@@ -13,31 +11,29 @@ type AdminLoginResponse struct {
Token string `json:"token"`
}
-type UploadUpdateAppReq struct {
- OperationID string `form:"operationID" binding:"required"`
- Type int `form:"type" binding:"required"`
- Version string `form:"version" binding:"required"`
- //File *multipart.FileHeader `form:"file" binding:"required"`
- //Yaml *multipart.FileHeader `form:"yaml" binding:"required"`
- ForceUpdate bool `form:"forceUpdate" binding:"required"`
+type AddUserRegisterAddFriendIDListRequest struct {
+ OperationID string `json:"operationID" binding:"required"`
+ UserIDList []string `json:"userIDList" binding:"required"`
}
-type UploadUpdateAppResp struct {
- apiStruct.CommResp
+type AddUserRegisterAddFriendIDListResponse struct {
}
-type GetDownloadURLReq struct {
+type ReduceUserRegisterAddFriendIDListRequest struct {
+ OperationID string `json:"operationID" binding:"required"`
+ UserIDList []string `json:"userIDList" binding:"required"`
+ Operation int32 `json:"operation"`
+}
+
+type ReduceUserRegisterAddFriendIDListResponse struct {
+}
+
+type GetUserRegisterAddFriendIDListRequest struct {
OperationID string `json:"operationID" binding:"required"`
- Type int `json:"type" binding:"required"`
- Version string `json:"version" binding:"required"`
+ RequestPaginationBody
}
-type GetDownloadURLResp struct {
- apiStruct.CommResp
- Data struct {
- HasNewVersion bool `json:"hasNewVersion"`
- ForceUpdate bool `json:"forceUpdate"`
- FileURL string `json:"fileURL"`
- YamlURL string `json:"yamlURL"`
- } `json:"data"`
+type GetUserRegisterAddFriendIDListResponse struct {
+ Users []*server_api_params.UserInfo `json:"users"`
+ ResponsePagination
}
diff --git a/pkg/cms_api_struct/common.go b/pkg/cms_api_struct/common.go
index 7d160f543..812e212ab 100644
--- a/pkg/cms_api_struct/common.go
+++ b/pkg/cms_api_struct/common.go
@@ -5,7 +5,12 @@ type RequestPagination struct {
ShowNumber int `form:"show_number" binding:"required"`
}
+type RequestPaginationBody struct {
+ PageNumber int `json:"pageNumber" binding:"required"`
+ ShowNumber int `json:"showNumber" binding:"required"`
+}
+
type ResponsePagination struct {
CurrentPage int `json:"current_number" binding:"required"`
- ShowNumber int `json:"show_number" binding:"required"`
-}
\ No newline at end of file
+ ShowNumber int `json:"show_number" binding:"required"`
+}
diff --git a/pkg/cms_api_struct/group.go b/pkg/cms_api_struct/group.go
index 7d3333127..5296478b6 100644
--- a/pkg/cms_api_struct/group.go
+++ b/pkg/cms_api_struct/group.go
@@ -1,32 +1,44 @@
package cms_api_struct
type GroupResponse struct {
- GroupName string `json:"group_name"`
- GroupID string `json:"group_id"`
- GroupMasterName string `json:"group_master_name"`
- GroupMasterId string `json:"group_master_id"`
- CreateTime string `json:"create_time"`
- IsBanChat bool `json:"is_ban_chat"`
- IsBanPrivateChat bool `json:"is_ban_private_chat"`
- ProfilePhoto string `json:"profile_photo"`
+ GroupOwnerName string `json:"GroupOwnerName"`
+ GroupOwnerID string `json:"GroupOwnerID"`
+ //*server_api_params.GroupInfo
+ GroupID string `json:"groupID"`
+ GroupName string `json:"groupName"`
+ Notification string `json:"notification"`
+ Introduction string `json:"introduction"`
+ FaceURL string `json:"faceURL"`
+ OwnerUserID string `json:"ownerUserID"`
+ CreateTime uint32 `json:"createTime"`
+ MemberCount uint32 `json:"memberCount"`
+ Ex string `json:"ex"`
+ Status int32 `json:"status"`
+ CreatorUserID string `json:"creatorUserID"`
+ GroupType int32 `json:"groupType"`
+ NeedVerification int32 `json:"needVerification"`
+ LookMemberInfo int32 `json:"lookMemberInfo"`
+ ApplyMemberFriend int32 `json:"applyMemberFriend"`
+ NotificationUpdateTime uint32 `json:"notificationUpdateTime"`
+ NotificationUserID string `json:"notificationUserID"`
}
-type GetGroupByIdRequest struct {
- GroupId string `form:"group_id" binding:"required"`
+type GetGroupByIDRequest struct {
+ GroupID string `form:"groupID" binding:"required"`
}
-type GetGroupByIdResponse struct {
+type GetGroupByIDResponse struct {
GroupResponse
}
type GetGroupRequest struct {
- GroupName string `form:"group_name" binding:"required"`
+ GroupName string `form:"groupName" binding:"required"`
RequestPagination
}
type GetGroupResponse struct {
Groups []GroupResponse `json:"groups"`
- GroupNums int `json:"group_nums"`
+ GroupNums int `json:"groupNums"`
ResponsePagination
}
@@ -36,77 +48,85 @@ type GetGroupsRequest struct {
type GetGroupsResponse struct {
Groups []GroupResponse `json:"groups"`
- GroupNums int `json:"group_nums"`
+ GroupNums int `json:"groupNums"`
ResponsePagination
}
type CreateGroupRequest struct {
- GroupName string `json:"group_name" binding:"required"`
- GroupMasterId string `json:"group_master_id" binding:"required"`
- GroupMembers []string `json:"group_members" binding:"required"`
+ GroupName string `json:"groupName" binding:"required"`
+ GroupMasterId string `json:"groupOwnerID" binding:"required"`
+ GroupMembers []string `json:"groupMembers" binding:"required"`
}
type CreateGroupResponse struct {
}
type SetGroupMasterRequest struct {
- GroupId string `json:"group_id" binding:"required"`
- UserId string `json:"user_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
+ UserId string `json:"userID" binding:"required"`
}
type SetGroupMasterResponse struct {
}
type SetGroupMemberRequest struct {
- GroupId string `json:"group_id" binding:"required"`
- UserId string `json:"user_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
+ UserId string `json:"userID" binding:"required"`
}
type SetGroupMemberRespones struct {
}
type BanGroupChatRequest struct {
- GroupId string `json:"group_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
}
type BanGroupChatResponse struct {
}
type BanPrivateChatRequest struct {
- GroupId string `json:"group_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
}
type BanPrivateChatResponse struct {
}
type DeleteGroupRequest struct {
- GroupId string `json:"group_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
}
type DeleteGroupResponse struct {
}
type GetGroupMembersRequest struct {
- GroupId string `form:"group_id" binding:"required"`
- UserName string `form:"user_name"`
+ GroupID string `form:"groupID" binding:"required"`
+ UserName string `form:"userName"`
RequestPagination
}
type GroupMemberResponse struct {
- MemberPosition int `json:"member_position"`
- MemberNickName string `json:"member_nick_name"`
- MemberId string `json:"member_id"`
- JoinTime string `json:"join_time"`
+ GroupID string `json:"groupID"`
+ UserID string `json:"userID"`
+ RoleLevel int32 `json:"roleLevel"`
+ JoinTime int32 `json:"joinTime"`
+ Nickname string `json:"nickname"`
+ FaceURL string `json:"faceURL"`
+ AppMangerLevel int32 `json:"appMangerLevel"` //if >0
+ JoinSource int32 `json:"joinSource"`
+ OperatorUserID string `json:"operatorUserID"`
+ Ex string `json:"ex"`
+ MuteEndTime uint32 `json:"muteEndTime"`
+ InviterUserID string `json:"inviterUserID"`
}
type GetGroupMembersResponse struct {
- GroupMembers []GroupMemberResponse `json:"group_members"`
+ GroupMembers []GroupMemberResponse `json:"groupMembers"`
ResponsePagination
- MemberNums int `json:"member_nums"`
+ MemberNums int `json:"memberNums"`
}
type GroupMemberRequest struct {
- GroupId string `json:"group_id" binding:"required"`
+ GroupId string `json:"groupID" binding:"required"`
Members []string `json:"members" binding:"required"`
}
@@ -132,12 +152,12 @@ type RemoveGroupMembersResponse struct {
}
type AlterGroupInfoRequest struct {
- GroupID string `json:"group_id"`
- GroupName string `json:"group_name"`
+ GroupID string `json:"groupID"`
+ GroupName string `json:"groupName"`
Notification string `json:"notification"`
Introduction string `json:"introduction"`
- ProfilePhoto string `json:"profile_photo"`
- GroupType int `json:"group_type"`
+ ProfilePhoto string `json:"profilePhoto"`
+ GroupType int `json:"groupType"`
}
type AlterGroupInfoResponse struct {
diff --git a/pkg/cms_api_struct/user.go b/pkg/cms_api_struct/user.go
index 2c0b004b0..d4902c97a 100644
--- a/pkg/cms_api_struct/user.go
+++ b/pkg/cms_api_struct/user.go
@@ -1,11 +1,20 @@
package cms_api_struct
type UserResponse struct {
- ProfilePhoto string `json:"profile_photo"`
- Nickname string `json:"nick_name"`
- UserId string `json:"user_id"`
- CreateTime string `json:"create_time,omitempty"`
- IsBlock bool `json:"is_block"`
+ ProfilePhoto string `json:"profile_photo"`
+ Nickname string `json:"nick_name"`
+ UserId string `json:"user_id"`
+ CreateTime string `json:"create_time,omitempty"`
+ CreateIp string `json:"create_ip,omitempty"`
+ LastLoginTime string `json:"last_login_time,omitempty"`
+ LastLoginIp string `json:"last_login_ip,omitempty"`
+ LoginTimes int32 `json:"login_times"`
+ LoginLimit int32 `json:"login_limit"`
+ IsBlock bool `json:"is_block"`
+ PhoneNumber string `json:"phone_number"`
+ Email string `json:"email"`
+ Birth string `json:"birth"`
+ Gender int `json:"gender"`
}
type GetUserRequest struct {
@@ -47,8 +56,11 @@ type ResignUserResponse struct {
type AlterUserRequest struct {
UserId string `json:"user_id" binding:"required"`
Nickname string `json:"nickname"`
- PhoneNumber int `json:"phone_number" validate:"len=11"`
+ PhoneNumber string `json:"phone_number" validate:"len=11"`
Email string `json:"email"`
+ Birth string `json:"birth"`
+ Gender string `json:"gender"`
+ Photo string `json:"photo"`
}
type AlterUserResponse struct {
@@ -58,6 +70,10 @@ type AddUserRequest struct {
PhoneNumber string `json:"phone_number" binding:"required"`
UserId string `json:"user_id" binding:"required"`
Name string `json:"name" binding:"required"`
+ Email string `json:"email"`
+ Birth string `json:"birth"`
+ Gender string `json:"gender"`
+ Photo string `json:"photo"`
}
type AddUserResponse struct {
diff --git a/pkg/common/callback/callback.go b/pkg/common/callback/callback.go
new file mode 100644
index 000000000..fa19e7961
--- /dev/null
+++ b/pkg/common/callback/callback.go
@@ -0,0 +1,23 @@
+package callback
+
+import (
+ "Open_IM/pkg/common/constant"
+ server_api_params "Open_IM/pkg/proto/sdk_ws"
+ "github.com/golang/protobuf/proto"
+)
+
+func GetContent(msg *server_api_params.MsgData) string {
+ if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd {
+ var tips server_api_params.TipsComm
+ _ = proto.Unmarshal(msg.Content, &tips)
+ //marshaler := jsonpb.Marshaler{
+ // OrigName: true,
+ // EnumsAsInts: false,
+ // EmitDefaults: false,
+ //}
+ content := tips.JsonDetail
+ return content
+ } else {
+ return string(msg.Content)
+ }
+}
diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index 5b145ddba..ba8b25fa2 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -72,6 +72,7 @@ type config struct {
EndpointInner string `yaml:"endpointInner"`
EndpointInnerEnable bool `yaml:"endpointInnerEnable"`
StorageTime int `yaml:"storageTime"`
+ IsDistributedMod bool `yaml:"isDistributedMod"`
} `yaml:"minio"`
Aws struct {
AccessKeyID string `yaml:"accessKeyID"`
@@ -101,16 +102,17 @@ type config struct {
DBMaxLifeTime int `yaml:"dbMaxLifeTime"`
}
Mongo struct {
- DBUri string `yaml:"dbUri"`
- DBAddress string `yaml:"dbAddress"`
- DBDirect bool `yaml:"dbDirect"`
- DBTimeout int `yaml:"dbTimeout"`
- DBDatabase string `yaml:"dbDatabase"`
- DBSource string `yaml:"dbSource"`
- DBUserName string `yaml:"dbUserName"`
- DBPassword string `yaml:"dbPassword"`
- DBMaxPoolSize int `yaml:"dbMaxPoolSize"`
- DBRetainChatRecords int `yaml:"dbRetainChatRecords"`
+ DBUri string `yaml:"dbUri"`
+ DBAddress string `yaml:"dbAddress"`
+ DBDirect bool `yaml:"dbDirect"`
+ DBTimeout int `yaml:"dbTimeout"`
+ DBDatabase string `yaml:"dbDatabase"`
+ DBSource string `yaml:"dbSource"`
+ DBUserName string `yaml:"dbUserName"`
+ DBPassword string `yaml:"dbPassword"`
+ DBMaxPoolSize int `yaml:"dbMaxPoolSize"`
+ DBRetainChatRecords int `yaml:"dbRetainChatRecords"`
+ ChatRecordsClearTime string `yaml:"chatRecordsClearTime"`
}
Redis struct {
DBAddress []string `yaml:"dbAddress"`
@@ -136,6 +138,7 @@ type config struct {
OpenImOrganizationPort []int `yaml:"openImOrganizationPort"`
OpenImConversationPort []int `yaml:"openImConversationPort"`
OpenImCachePort []int `yaml:"openImCachePort"`
+ OpenImRealTimeCommPort []int `yaml:"openImRealTimeCommPort"`
}
RpcRegisterName struct {
OpenImStatisticsName string `yaml:"openImStatisticsName"`
@@ -272,6 +275,7 @@ type config struct {
CallbackWordFilter callBackConfig `yaml:"callbackWordFilter"`
CallbackUserOnline callBackConfig `yaml:"callbackUserOnline"`
CallbackUserOffline callBackConfig `yaml:"callbackUserOffline"`
+ CallbackUserKickOff callBackConfig `yaml:"callbackUserKickOff"`
CallbackOfflinePush callBackConfig `yaml:"callbackOfflinePush"`
CallbackOnlinePush callBackConfig `yaml:"callbackOnlinePush"`
CallbackBeforeSuperGroupOnlinePush callBackConfig `yaml:"callbackSuperGroupOnlinePush"`
@@ -497,8 +501,13 @@ type config struct {
SmtpAddr string `yaml:"smtpAddr"`
SmtpPort int `yaml:"smtpPort"`
}
- TestDepartMentID string `yaml:"testDepartMentID"`
- ImAPIURL string `yaml:"imAPIURL"`
+ TestDepartMentID string `yaml:"testDepartMentID"`
+ ImAPIURL string `yaml:"imAPIURL"`
+ NeedInvitationCode bool `yaml:"needInvitationCode"`
+ OnboardProcess bool `yaml:"onboardProcess"`
+ JoinDepartmentIDList []string `yaml:"joinDepartmentIDList"`
+ JoinDepartmentGroups bool `yaml:"joinDepartmentGroups"`
+ OaNotification bool `yaml:"oaNotification"`
}
Rtc struct {
SignalTimeout string `yaml:"signalTimeout"`
@@ -521,17 +530,27 @@ type PDefaultTips struct {
func init() {
cfgName := os.Getenv("CONFIG_NAME")
- fmt.Println("get config path is:", Root, cfgName)
-
+ fmt.Println("GET IM DEFAULT CONFIG PATH :", Root, "ENV PATH:", cfgName)
if len(cfgName) != 0 {
- Root = cfgName
- }
-
- bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
- if err != nil {
- panic(err.Error())
- }
- if err = yaml.Unmarshal(bytes, &Config); err != nil {
- panic(err.Error())
+ bytes, err := ioutil.ReadFile(filepath.Join(cfgName, "config", "config.yaml"))
+ if err != nil {
+ bytes, err = ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
+ if err != nil {
+ panic(err.Error() + " config: " + filepath.Join(cfgName, "config", "config.yaml"))
+ }
+ } else {
+ Root = cfgName
+ }
+ if err = yaml.Unmarshal(bytes, &Config); err != nil {
+ panic(err.Error())
+ }
+ } else {
+ bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
+ if err != nil {
+ panic(err.Error())
+ }
+ if err = yaml.Unmarshal(bytes, &Config); err != nil {
+ panic(err.Error())
+ }
}
}
diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go
index 0f2a07e84..c8f9986b4 100644
--- a/pkg/common/constant/constant.go
+++ b/pkg/common/constant/constant.go
@@ -64,7 +64,6 @@ const (
FriendRemarkSetNotification = 1206 //set_friend_remark?
BlackAddedNotification = 1207 //add_black
BlackDeletedNotification = 1208 //remove_black
- MsgDeleteNotification = 1209
ConversationOptChangeNotification = 1300 // change conversation opt
@@ -100,9 +99,11 @@ const (
SuperGroupNotificationBegin = 1650
SuperGroupUpdateNotification = 1651
+ MsgDeleteNotification = 1652
SuperGroupNotificationEnd = 1699
ConversationPrivateChatNotification = 1701
+ ConversationUnreadNotification = 1702
OrganizationChangedNotification = 1801
@@ -139,6 +140,8 @@ const (
WebAndOther = 3
//The PC side is mutually exclusive, and the mobile side is mutually exclusive, but the web side can be online at the same time
PcMobileAndWeb = 4
+ //The PC terminal can be online at the same time,but other terminal only one of the endpoints can login
+ PCAndOther = 5
OnlineStatus = "online"
OfflineStatus = "offline"
@@ -200,6 +203,7 @@ const (
CallbackWordFilterCommand = "callbackWordFilterCommand"
CallbackUserOnlineCommand = "callbackUserOnlineCommand"
CallbackUserOfflineCommand = "callbackUserOfflineCommand"
+ CallbackUserKickOffCommand = "callbackUserKickOffCommand"
CallbackOfflinePushCommand = "callbackOfflinePushCommand"
CallbackOnlinePushCommand = "callbackOnlinePushCommand"
CallbackSuperGroupOnlinePushCommand = "callbackSuperGroupOnlinePushCommand"
@@ -226,6 +230,12 @@ const (
WorkMomentLikeNotification = 1
WorkMomentAtUserNotification = 2
)
+
+const (
+ WriteDiffusion = 0
+ ReadDiffusion = 1
+)
+
const (
AtAllString = "AtAllTag"
AtNormal = 0
@@ -288,6 +298,11 @@ const (
Directly = 2 //直接进群
)
+const (
+ GroupRPCRecvSize = 30
+ GroupRPCSendSize = 30
+)
+
const FriendAcceptTip = "You have successfully become friends, so start chatting"
func GroupIsBanChat(status int32) bool {
diff --git a/pkg/common/constant/error.go b/pkg/common/constant/error.go
index 10d8a219c..c621951b6 100644
--- a/pkg/common/constant/error.go
+++ b/pkg/common/constant/error.go
@@ -50,6 +50,7 @@ var (
DBMsg = errors.New("db failed")
ArgsMsg = errors.New("args failed")
CallBackMsg = errors.New("callback failed")
+ InvitationMsg = errors.New("invitationCode error")
ThirdPartyMsg = errors.New("third party error")
)
@@ -67,6 +68,9 @@ const (
CodeInvalidOrExpired = 10009
RegisterFailed = 10010
ResetPasswordFailed = 10011
+ RegisterLimit = 10012
+ LoginLimit = 10013
+ InvitationError = 10014
DatabaseError = 10002
ServerError = 10004
HttpError = 10005
diff --git a/pkg/common/constant/platform_number_id_to_name.go b/pkg/common/constant/platform_number_id_to_name.go
index cac93dea8..0480db01b 100644
--- a/pkg/common/constant/platform_number_id_to_name.go
+++ b/pkg/common/constant/platform_number_id_to_name.go
@@ -5,22 +5,26 @@ package constant
const (
//Platform ID
- IOSPlatformID = 1
- AndroidPlatformID = 2
- WindowsPlatformID = 3
- OSXPlatformID = 4
- WebPlatformID = 5
- MiniWebPlatformID = 6
- LinuxPlatformID = 7
+ IOSPlatformID = 1
+ AndroidPlatformID = 2
+ WindowsPlatformID = 3
+ OSXPlatformID = 4
+ WebPlatformID = 5
+ MiniWebPlatformID = 6
+ LinuxPlatformID = 7
+ AndroidPadPlatformID = 8
+ IPadPlatformID = 9
//Platform string match to Platform ID
- IOSPlatformStr = "IOS"
- AndroidPlatformStr = "Android"
- WindowsPlatformStr = "Windows"
- OSXPlatformStr = "OSX"
- WebPlatformStr = "Web"
- MiniWebPlatformStr = "MiniWeb"
- LinuxPlatformStr = "Linux"
+ IOSPlatformStr = "IOS"
+ AndroidPlatformStr = "Android"
+ WindowsPlatformStr = "Windows"
+ OSXPlatformStr = "OSX"
+ WebPlatformStr = "Web"
+ MiniWebPlatformStr = "MiniWeb"
+ LinuxPlatformStr = "Linux"
+ AndroidPadPlatformStr = "APad"
+ IPadPlatformStr = "IPad"
//terminal types
TerminalPC = "PC"
@@ -28,22 +32,26 @@ const (
)
var PlatformID2Name = map[int]string{
- IOSPlatformID: IOSPlatformStr,
- AndroidPlatformID: AndroidPlatformStr,
- WindowsPlatformID: WindowsPlatformStr,
- OSXPlatformID: OSXPlatformStr,
- WebPlatformID: WebPlatformStr,
- MiniWebPlatformID: MiniWebPlatformStr,
- LinuxPlatformID: LinuxPlatformStr,
+ IOSPlatformID: IOSPlatformStr,
+ AndroidPlatformID: AndroidPlatformStr,
+ WindowsPlatformID: WindowsPlatformStr,
+ OSXPlatformID: OSXPlatformStr,
+ WebPlatformID: WebPlatformStr,
+ MiniWebPlatformID: MiniWebPlatformStr,
+ LinuxPlatformID: LinuxPlatformStr,
+ AndroidPadPlatformID: AndroidPadPlatformStr,
+ IPadPlatformID: IPadPlatformStr,
}
var PlatformName2ID = map[string]int{
- IOSPlatformStr: IOSPlatformID,
- AndroidPlatformStr: AndroidPlatformID,
- WindowsPlatformStr: WindowsPlatformID,
- OSXPlatformStr: OSXPlatformID,
- WebPlatformStr: WebPlatformID,
- MiniWebPlatformStr: MiniWebPlatformID,
- LinuxPlatformStr: LinuxPlatformID,
+ IOSPlatformStr: IOSPlatformID,
+ AndroidPlatformStr: AndroidPlatformID,
+ WindowsPlatformStr: WindowsPlatformID,
+ OSXPlatformStr: OSXPlatformID,
+ WebPlatformStr: WebPlatformID,
+ MiniWebPlatformStr: MiniWebPlatformID,
+ LinuxPlatformStr: LinuxPlatformID,
+ AndroidPadPlatformStr: AndroidPadPlatformID,
+ IPadPlatformStr: IPadPlatformID,
}
var Platform2class = map[string]string{
IOSPlatformStr: TerminalMobile,
diff --git a/pkg/common/db/RedisModel.go b/pkg/common/db/RedisModel.go
index 2ef11d59b..b211739e1 100644
--- a/pkg/common/db/RedisModel.go
+++ b/pkg/common/db/RedisModel.go
@@ -11,11 +11,12 @@ import (
"context"
"errors"
"fmt"
+ "strconv"
+ "time"
+
go_redis "github.com/go-redis/redis/v8"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
- "strconv"
- "time"
)
const (
@@ -34,6 +35,7 @@ const (
FcmToken = "FCM_TOKEN:"
groupUserMinSeq = "GROUP_USER_MIN_SEQ:"
groupMaxSeq = "GROUP_MAX_SEQ:"
+ groupMinSeq = "GROUP_MIN_SEQ:"
sendMsgFailedFlag = "SEND_MSG_FAILED_FLAG:"
)
@@ -115,6 +117,11 @@ func (d *DataBases) SetGroupMaxSeq(groupID string, maxSeq uint64) error {
return d.RDB.Set(context.Background(), key, maxSeq, 0).Err()
}
+func (d *DataBases) SetGroupMinSeq(groupID string, minSeq uint32) error {
+ key := groupMinSeq + groupID
+ return d.RDB.Set(context.Background(), key, minSeq, 0).Err()
+}
+
//Store userid and platform class to redis
func (d *DataBases) AddTokenFlag(userID string, platformID int, token string, flag int) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
@@ -179,14 +186,14 @@ func (d *DataBases) GetMessageListBySeq(userID string, seqList []uint32, operati
if err != nil {
errResult = err
failedSeqList = append(failedSeqList, v)
- log2.NewWarn(operationID, "redis get message error:", err.Error(), v)
+ log2.Debug(operationID, "redis get message error: ", err.Error(), v)
} else {
msg := pbCommon.MsgData{}
err = jsonpb.UnmarshalString(result, &msg)
if err != nil {
errResult = err
failedSeqList = append(failedSeqList, v)
- log2.NewWarn(operationID, "Unmarshal err", result, err.Error())
+ log2.NewWarn(operationID, "Unmarshal err ", result, err.Error())
} else {
log2.NewDebug(operationID, "redis get msg is ", msg.String())
seqMsg = append(seqMsg, &msg)
@@ -196,6 +203,7 @@ func (d *DataBases) GetMessageListBySeq(userID string, seqList []uint32, operati
}
return seqMsg, failedSeqList, errResult
}
+
func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string, operationID string) error {
ctx := context.Background()
pipe := d.RDB.Pipeline()
@@ -223,16 +231,14 @@ func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string,
}
func (d *DataBases) DeleteMessageFromCache(msgList []*pbChat.MsgDataToMQ, uid string, operationID string) error {
ctx := context.Background()
- var keys []string
for _, msg := range msgList {
key := messageCache + uid + "_" + strconv.Itoa(int(msg.MsgData.Seq))
- keys = append(keys, key)
+ err := d.RDB.Del(ctx, key).Err()
+ if err != nil {
+ log2.NewWarn(operationID, utils.GetSelfFuncName(), "redis failed", "args:", key, uid, err.Error(), msgList)
+ }
}
- err := d.RDB.Del(ctx, keys...).Err()
- if err != nil {
- log2.NewWarn(operationID, utils.GetSelfFuncName(), "redis failed", "args:", keys, uid, err.Error(), msgList)
- }
- return err
+ return nil
}
func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error {
@@ -246,8 +252,8 @@ func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID str
if err != nil {
return utils.Wrap(err, "")
}
- if err = d.RDB.Del(ctx, vals...).Err(); err != nil {
- return utils.Wrap(err, "")
+ for _, v := range vals {
+ err = d.RDB.Del(ctx, v).Err()
}
return nil
}
@@ -353,10 +359,18 @@ func (d *DataBases) DelUserSignalList(userID string) error {
func (d *DataBases) DelMsgFromCache(uid string, seqList []uint32, operationID string) {
for _, seq := range seqList {
key := messageCache + uid + "_" + strconv.Itoa(int(seq))
- result := d.RDB.Get(context.Background(), key).String()
+ result, err := d.RDB.Get(context.Background(), key).Result()
+ if err != nil {
+ if err == go_redis.Nil {
+ log2.NewDebug(operationID, utils.GetSelfFuncName(), err.Error(), "redis nil")
+ } else {
+ log2.NewError(operationID, utils.GetSelfFuncName(), err.Error(), key)
+ }
+ continue
+ }
var msg pbCommon.MsgData
if err := utils.String2Pb(result, &msg); err != nil {
- log2.Error(operationID, utils.GetSelfFuncName(), "String2Pb failed", msg, err.Error())
+ log2.Error(operationID, utils.GetSelfFuncName(), "String2Pb failed", msg, result, key, err.Error())
continue
}
msg.Status = constant.MsgDeleted
@@ -376,8 +390,8 @@ func (d *DataBases) SetGetuiToken(token string, expireTime int64) error {
}
func (d *DataBases) GetGetuiToken() (string, error) {
- result := d.RDB.Get(context.Background(), getuiToken)
- return result.String(), result.Err()
+ result, err := d.RDB.Get(context.Background(), getuiToken).Result()
+ return result, err
}
func (d *DataBases) SetSendMsgFailedFlag(operationID string) error {
diff --git a/pkg/common/db/batch_insert_chat.go b/pkg/common/db/batch_insert_chat.go
index f2920813d..16096f9bb 100644
--- a/pkg/common/db/batch_insert_chat.go
+++ b/pkg/common/db/batch_insert_chat.go
@@ -26,12 +26,15 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo
isInit := false
var remain uint64
blk0 := uint64(GetSingleGocMsgNum() - 1)
+ //currentMaxSeq 4998
if currentMaxSeq < uint64(GetSingleGocMsgNum()) {
- remain = blk0 - currentMaxSeq
+ remain = blk0 - currentMaxSeq //1
} else {
- excludeBlk0 := currentMaxSeq - blk0
+ excludeBlk0 := currentMaxSeq - blk0 //=1
+ //(5000-1)%5000 == 4999
remain = (uint64(GetSingleGocMsgNum()) - (excludeBlk0 % uint64(GetSingleGocMsgNum()))) % uint64(GetSingleGocMsgNum())
}
+ //remain=1
insertCounter := uint64(0)
msgListToMongo := make([]MsgInfo, 0)
msgListToMongoNext := make([]MsgInfo, 0)
@@ -45,6 +48,7 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo
sMsg := MsgInfo{}
sMsg.SendTime = m.MsgData.SendTime
m.MsgData.Seq = uint32(currentMaxSeq)
+ log.Debug(operationID, "mongo msg node ", m.String(), m.MsgData.ClientMsgID, "userID: ", userID, "seq: ", currentMaxSeq)
if sMsg.Msg, err = proto.Marshal(m.MsgData); err != nil {
return utils.Wrap(err, "")
}
@@ -58,11 +62,11 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo
msgListToMongo = append(msgListToMongo, sMsg)
insertCounter++
seqUid = getSeqUid(userID, uint32(currentMaxSeq))
- log.Debug(operationID, "msgListToMongo ", seqUid, m.MsgData.Seq, m.MsgData.ClientMsgID, insertCounter, remain)
+ log.Debug(operationID, "msgListToMongo ", seqUid, m.MsgData.Seq, m.MsgData.ClientMsgID, insertCounter, remain, "userID: ", userID)
} else {
msgListToMongoNext = append(msgListToMongoNext, sMsg)
seqUidNext = getSeqUid(userID, uint32(currentMaxSeq))
- log.Debug(operationID, "msgListToMongoNext ", seqUidNext, m.MsgData.Seq, m.MsgData.ClientMsgID, insertCounter, remain)
+ log.Debug(operationID, "msgListToMongoNext ", seqUidNext, m.MsgData.Seq, m.MsgData.ClientMsgID, insertCounter, remain, "userID: ", userID)
}
}
@@ -71,7 +75,7 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo
if seqUid != "" {
filter := bson.M{"uid": seqUid}
- log.NewDebug(operationID, "filter ", seqUid, "list ", msgListToMongo)
+ log.NewDebug(operationID, "filter ", seqUid, "list ", msgListToMongo, "userID: ", userID)
err := c.FindOneAndUpdate(ctx, filter, bson.M{"$push": bson.M{"msg": bson.M{"$each": msgListToMongo}}}).Err()
if err != nil {
if err == mongo.ErrNoDocuments {
@@ -95,7 +99,7 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo
sChat := UserChat{}
sChat.UID = seqUidNext
sChat.Msg = msgListToMongoNext
- log.NewDebug(operationID, "filter ", seqUidNext, "list ", msgListToMongoNext)
+ log.NewDebug(operationID, "filter ", seqUidNext, "list ", msgListToMongoNext, "userID: ", userID)
if _, err = c.InsertOne(ctx, &sChat); err != nil {
log.NewError(operationID, "InsertOne failed", filter, err.Error(), sChat)
return utils.Wrap(err, "")
@@ -119,8 +123,10 @@ func (d *DataBases) BatchInsertChat2Cache(insertID string, msgList []*pbMsg.MsgD
var err error
if msgList[0].MsgData.SessionType == constant.SuperGroupChatType {
currentMaxSeq, err = d.GetGroupMaxSeq(insertID)
+ log.Debug(operationID, "constant.SuperGroupChatType lastMaxSeq before add ", currentMaxSeq, "userID ", insertID, err)
} else {
currentMaxSeq, err = d.GetUserMaxSeq(insertID)
+ log.Debug(operationID, "constant.SingleChatType lastMaxSeq before add ", currentMaxSeq, "userID ", insertID, err)
}
if err != nil && err != go_redis.Nil {
return utils.Wrap(err, ""), 0
@@ -128,11 +134,12 @@ func (d *DataBases) BatchInsertChat2Cache(insertID string, msgList []*pbMsg.MsgD
lastMaxSeq := currentMaxSeq
for _, m := range msgList {
- log.Debug(operationID, "msg node ", m.String(), m.MsgData.ClientMsgID)
+
currentMaxSeq++
sMsg := MsgInfo{}
sMsg.SendTime = m.MsgData.SendTime
m.MsgData.Seq = uint32(currentMaxSeq)
+ log.Debug(operationID, "cache msg node ", m.String(), m.MsgData.ClientMsgID, "userID: ", insertID, "seq: ", currentMaxSeq)
}
log.Debug(operationID, "SetMessageToCache ", insertID, len(msgList))
err = d.SetMessageToCache(msgList, insertID, operationID)
diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go
index 60f2de972..a58899607 100644
--- a/pkg/common/db/model_struct.go
+++ b/pkg/common/db/model_struct.go
@@ -3,11 +3,21 @@ package db
import "time"
type Register struct {
- Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
- Password string `gorm:"column:password;type:varchar(255)" json:"password"`
- Ex string `gorm:"column:ex;size:1024" json:"ex"`
- UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
- AreaCode string `gorm:"column:area_code;type:varchar(255)"`
+ Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
+ Password string `gorm:"column:password;type:varchar(255)" json:"password"`
+ Ex string `gorm:"column:ex;size:1024" json:"ex"`
+ UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
+ AreaCode string `gorm:"column:area_code;type:varchar(255)"`
+ InvitationCode string `gorm:"column:invitation_code;type:varchar(255)"`
+ RegisterIP string `gorm:"column:register_ip;type:varchar(255)"`
+}
+
+type Invitation struct {
+ InvitationCode string `gorm:"column:invitation_code;primary_key;type:varchar(32)"`
+ CreateTime time.Time `gorm:"column:create_time"`
+ UserID string `gorm:"column:user_id"`
+ LastTime time.Time `gorm:"column:last_time"`
+ Status int32 `gorm:"column:status"`
}
//
@@ -153,8 +163,9 @@ type GroupRequest struct {
//string Birth = 6;
//string Email = 7;
//string Ex = 8;
-//int64 CreateTime = 9;
-//int32 AppMangerLevel = 10;
+//string CreateIp = 9;
+//int64 CreateTime = 10;
+//int32 AppMangerLevel = 11;
//open_im_sdk.User == imdb.User
type User struct {
UserID string `gorm:"column:user_id;primary_key;size:64"`
@@ -166,11 +177,31 @@ type User struct {
Email string `gorm:"column:email;size:64"`
Ex string `gorm:"column:ex;size:1024"`
CreateTime time.Time `gorm:"column:create_time"`
+ CreateIp string `gorm:"column:create_ip;size:15"`
+ LastLoginTime time.Time `gorm:"column:last_login_time"`
+ LastLoginIp string `gorm:"column:last_login_ip;size:15"`
+ LoginTimes int32 `gorm:"column:login_times"`
+ LoginLimit int32 `gorm:"column:login_limit"`
AppMangerLevel int32 `gorm:"column:app_manger_level"`
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"`
+ InvitationCode string `gorm:"column:invitation_code"`
status int32 `gorm:"column:status"`
}
+type IpLimit struct {
+ Ip string `gorm:"column:ip;primary_key;size:15"`
+ LimitRegister int32 `gorm:"column:limit_register;size:1"`
+ LimitLogin int32 `gorm:"column:limit_login;size:1"`
+ CreateTime time.Time `gorm:"column:create_time"`
+ LimitTime time.Time `gorm:"column:limit_time"`
+}
+
+type UserIpLimit struct {
+ UserID string `gorm:"column:user_id;primary_key;size:64"`
+ Ip string `gorm:"column:ip;primary_key;size:15"`
+ CreateTime time.Time `gorm:"column:create_time"`
+}
+
//message BlackInfo{
//string OwnerUserID = 1;
//int64 CreateTime = 2;
@@ -217,20 +248,21 @@ type BlackList struct {
EndDisableTime time.Time `gorm:"column:end_disable_time"`
}
type Conversation struct {
- OwnerUserID string `gorm:"column:owner_user_id;primary_key;type:char(128)" json:"OwnerUserID"`
- ConversationID string `gorm:"column:conversation_id;primary_key;type:char(128)" json:"conversationID"`
- ConversationType int32 `gorm:"column:conversation_type" json:"conversationType"`
- UserID string `gorm:"column:user_id;type:char(64)" json:"userID"`
- GroupID string `gorm:"column:group_id;type:char(128)" json:"groupID"`
- RecvMsgOpt int32 `gorm:"column:recv_msg_opt" json:"recvMsgOpt"`
- UnreadCount int32 `gorm:"column:unread_count" json:"unreadCount"`
- DraftTextTime int64 `gorm:"column:draft_text_time" json:"draftTextTime"`
- IsPinned bool `gorm:"column:is_pinned" json:"isPinned"`
- IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"`
- GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"`
- IsNotInGroup bool `gorm:"column:is_not_in_group" json:"isNotInGroup"`
- AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"`
- Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
+ OwnerUserID string `gorm:"column:owner_user_id;primary_key;type:char(128)" json:"OwnerUserID"`
+ ConversationID string `gorm:"column:conversation_id;primary_key;type:char(128)" json:"conversationID"`
+ ConversationType int32 `gorm:"column:conversation_type" json:"conversationType"`
+ UserID string `gorm:"column:user_id;type:char(64)" json:"userID"`
+ GroupID string `gorm:"column:group_id;type:char(128)" json:"groupID"`
+ RecvMsgOpt int32 `gorm:"column:recv_msg_opt" json:"recvMsgOpt"`
+ UnreadCount int32 `gorm:"column:unread_count" json:"unreadCount"`
+ DraftTextTime int64 `gorm:"column:draft_text_time" json:"draftTextTime"`
+ IsPinned bool `gorm:"column:is_pinned" json:"isPinned"`
+ IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"`
+ GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"`
+ IsNotInGroup bool `gorm:"column:is_not_in_group" json:"isNotInGroup"`
+ UpdateUnreadCountTime int64 `gorm:"column:update_unread_count_time" json:"updateUnreadCountTime"`
+ AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"`
+ Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
}
func (Conversation) TableName() string {
@@ -299,3 +331,19 @@ type AppVersion struct {
func (AppVersion) TableName() string {
return "app_version"
}
+
+type RegisterAddFriend struct {
+ UserID string `gorm:"column:user_id;primary_key;size:64"`
+}
+
+func (RegisterAddFriend) TableName() string {
+ return "register_add_friend"
+}
+
+type ClientInitConfig struct {
+ DiscoverPageURL string `gorm:"column:discover_page_url;size:64" json:"version"`
+}
+
+func (ClientInitConfig) TableName() string {
+ return "client_init_config"
+}
diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go
index 9ddcd0085..4953aaabc 100644
--- a/pkg/common/db/mongoModel.go
+++ b/pkg/common/db/mongoModel.go
@@ -46,6 +46,7 @@ type MsgInfo struct {
type UserChat struct {
UID string
+ //ListIndex int `bson:"index"`
Msg []MsgInfo
}
@@ -258,6 +259,75 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st
return seqMsg, nil
}
+func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) {
+ ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
+ c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
+ regex := fmt.Sprintf("^%s", ID)
+ findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1})
+ var msgs []UserChat
+ cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts)
+ if err != nil {
+ return nil, err
+ }
+ err = cursor.Decode(&msgs)
+ if err != nil {
+ return nil, utils.Wrap(err, "")
+ }
+ if len(msgs) > 0 {
+ return &msgs[0], err
+ } else {
+ return nil, errors.New("get msg list failed")
+ }
+}
+
+func (d *DataBases) DelMongoMsgs(IDList []string) error {
+ ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
+ c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
+ _, err := c.DeleteMany(ctx, bson.M{"uid": bson.M{"$in": IDList}})
+ return err
+}
+
+func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) error {
+ ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
+ c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
+ userChat := &UserChat{}
+ err := c.FindOne(ctx, bson.M{"uid": suffixID}).Decode(&userChat)
+ if err != nil {
+ return err
+ }
+ for i, msg := range userChat.Msg {
+ if i <= index {
+ msg.Msg = nil
+ msg.SendTime = 0
+ }
+ }
+ _, err = c.UpdateOne(ctx, bson.M{"uid": suffixID}, userChat)
+ return err
+}
+
+func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) {
+ ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
+ c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
+ regex := fmt.Sprintf("^%s", ID)
+ findOpts := options.Find().SetLimit(1).SetSort(bson.M{"uid": -1})
+ var userChats []UserChat
+ cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts)
+ if err != nil {
+ return nil, err
+ }
+ err = cursor.Decode(&userChats)
+ if err != nil {
+ return nil, utils.Wrap(err, "")
+ }
+ if len(userChats) > 0 {
+ if len(userChats[0].Msg) > 0 {
+ return &userChats[0].Msg[len(userChats[0].Msg)], nil
+ }
+ return nil, errors.New("len(userChats[0].Msg) < 0")
+ }
+ return nil, errors.New("len(userChats) < 0")
+}
+
func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
var hasSeqList []uint32
singleCount := 0
@@ -945,14 +1015,14 @@ func (d *DataBases) GetUserFriendWorkMoments(showNumber, pageNumber int32, userI
}
type SuperGroup struct {
- GroupID string `bson:"group_id"`
+ GroupID string `bson:"group_id" json:"groupID"`
//MemberNumCount int `bson:"member_num_count"`
- MemberIDList []string `bson:"member_id_list"`
+ MemberIDList []string `bson:"member_id_list" json:"memberIDList"`
}
type UserToSuperGroup struct {
- UserID string `bson:"user_id"`
- GroupIDList []string `bson:"group_id_list"`
+ UserID string `bson:"user_id" json:"userID"`
+ GroupIDList []string `bson:"group_id_list" json:"groupIDList"`
}
func (d *DataBases) CreateSuperGroup(groupID string, initMemberIDList []string, memberNumCount int) error {
@@ -1074,7 +1144,8 @@ func (d *DataBases) GetSuperGroupByUserID(userID string) (UserToSuperGroup, erro
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup)
var user UserToSuperGroup
- return user, c.FindOne(ctx, bson.M{"user_id": userID}).Decode(&user)
+ _ = c.FindOne(ctx, bson.M{"user_id": userID}).Decode(&user)
+ return user, nil
}
func (d *DataBases) DeleteSuperGroup(groupID string) error {
@@ -1191,6 +1262,7 @@ func isNotContainInt32(target uint32, List []uint32) bool {
func indexGen(uid string, seqSuffix uint32) string {
return uid + ":" + strconv.FormatInt(int64(seqSuffix), 10)
}
+
func superGroupIndexGen(groupID string, seqSuffix uint32) string {
return "super_group_" + groupID + ":" + strconv.FormatInt(int64(seqSuffix), 10)
}
diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go
index 17de81d56..f28be8dc1 100644
--- a/pkg/common/db/mysql.go
+++ b/pkg/common/db/mysql.go
@@ -2,14 +2,13 @@ package db
import (
"Open_IM/pkg/common/config"
- "gorm.io/gorm/logger"
-
"fmt"
"sync"
"time"
"gorm.io/driver/mysql"
"gorm.io/gorm"
+ "gorm.io/gorm/logger"
)
type mysqlDB struct {
@@ -79,7 +78,8 @@ func initMysqlDB() {
&GroupMember{},
&GroupRequest{},
&User{},
- &Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{})
+ &Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{}, &BlackList{}, &IpLimit{}, &UserIpLimit{}, &Invitation{}, &RegisterAddFriend{},
+ &ClientInitConfig{})
db.Set("gorm:table_options", "CHARSET=utf8")
db.Set("gorm:table_options", "collation=utf8_unicode_ci")
@@ -143,6 +143,33 @@ func initMysqlDB() {
fmt.Println("CreateTable DepartmentMember")
db.Migrator().CreateTable(&AppVersion{})
}
+ if !db.Migrator().HasTable(&BlackList{}) {
+ fmt.Println("CreateTable BlackList")
+ db.Migrator().CreateTable(&BlackList{})
+ }
+ if !db.Migrator().HasTable(&IpLimit{}) {
+ fmt.Println("CreateTable IpLimit")
+ db.Migrator().CreateTable(&IpLimit{})
+ }
+ if !db.Migrator().HasTable(&UserIpLimit{}) {
+ fmt.Println("CreateTable UserIpLimit")
+ db.Migrator().CreateTable(&UserIpLimit{})
+ }
+
+ if !db.Migrator().HasTable(&RegisterAddFriend{}) {
+ fmt.Println("CreateTable RegisterAddFriend")
+ db.Migrator().CreateTable(&RegisterAddFriend{})
+ }
+ if !db.Migrator().HasTable(&Invitation{}) {
+ fmt.Println("CreateTable Invitation")
+ db.Migrator().CreateTable(&Invitation{})
+ }
+
+ if !db.Migrator().HasTable(&ClientInitConfig{}) {
+ fmt.Println("CreateTable ClientInitConfig")
+ db.Migrator().CreateTable(&ClientInitConfig{})
+ }
+
DB.MysqlDB.db = db
return
}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/client_config.go b/pkg/common/db/mysql_model/im_mysql_model/client_config.go
new file mode 100644
index 000000000..ae932ed92
--- /dev/null
+++ b/pkg/common/db/mysql_model/im_mysql_model/client_config.go
@@ -0,0 +1,22 @@
+package im_mysql_model
+
+import "Open_IM/pkg/common/db"
+
+func SetClientInitConfig(m map[string]interface{}) error {
+ result := db.DB.MysqlDB.DefaultGormDB().Model(&db.ClientInitConfig{}).Where("1=1").Updates(m)
+ if result.Error != nil {
+ return result.Error
+ }
+ if result.RowsAffected == 0 {
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.ClientInitConfig{}).Create(m).Error
+ return err
+ }
+
+ return nil
+}
+
+func GetClientInitConfig() (db.ClientInitConfig, error) {
+ var config db.ClientInitConfig
+ err := db.DB.MysqlDB.DefaultGormDB().Model((&db.ClientInitConfig{})).First(&config).Error
+ return config, err
+}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/conversation_model.go b/pkg/common/db/mysql_model/im_mysql_model/conversation_model.go
index 5588ba912..52fe1dcb9 100644
--- a/pkg/common/db/mysql_model/im_mysql_model/conversation_model.go
+++ b/pkg/common/db/mysql_model/im_mysql_model/conversation_model.go
@@ -6,16 +6,18 @@ import (
"Open_IM/pkg/utils"
)
-func SetConversation(conversation db.Conversation) error {
+func SetConversation(conversation db.Conversation) (bool, error) {
+ var isUpdate bool
newConversation := conversation
if db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
- return db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Create(conversation).Error
+ return isUpdate, db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
- return db.DB.MysqlDB.DefaultGormDB().Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
+ isUpdate = true
+ return isUpdate, db.DB.MysqlDB.DefaultGormDB().Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Updates(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat,
"group_at_type": conversation.GroupAtType, "is_not_in_group": conversation.IsNotInGroup}).Error
}
@@ -39,16 +41,18 @@ func PeerUserSetConversation(conversation db.Conversation) error {
}
-func SetRecvMsgOpt(conversation db.Conversation) error {
+func SetRecvMsgOpt(conversation db.Conversation) (bool, error) {
+ var isUpdate bool
newConversation := conversation
if db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
- return db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Create(conversation).Error
+ return isUpdate, db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
- return db.DB.MysqlDB.DefaultGormDB().Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
+ isUpdate = true
+ return isUpdate, db.DB.MysqlDB.DefaultGormDB().Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Updates(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt}).Error
}
}
@@ -83,12 +87,20 @@ func GetConversations(OwnerUserID string, conversationIDs []string) ([]db.Conver
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
return conversations, err
}
+
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]db.Conversation, error) {
var conversations []db.Conversation
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}
+
func UpdateColumnsConversations(ownerUserIDList []string, conversationID string, args map[string]interface{}) error {
return db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", ownerUserIDList, conversationID).Updates(args).Error
}
+
+func GetConversationIDListByUserID(userID string) ([]string, error) {
+ var IDList []string
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.Conversation{}).Where("owner_user_id=?", userID).Pluck("conversation_id", &IDList).Error
+ return IDList, err
+}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/demo_model.go b/pkg/common/db/mysql_model/im_mysql_model/demo_model.go
index 8668026d7..349555c31 100644
--- a/pkg/common/db/mysql_model/im_mysql_model/demo_model.go
+++ b/pkg/common/db/mysql_model/im_mysql_model/demo_model.go
@@ -2,6 +2,7 @@ package im_mysql_model
import (
"Open_IM/pkg/common/db"
+ "errors"
_ "gorm.io/gorm"
)
@@ -11,13 +12,19 @@ func GetRegister(account, areaCode, userID string) (*db.Register, error) {
userID, "", account, account, areaCode).Take(&r).Error
}
-func SetPassword(account, password, ex, userID, areaCode string) error {
+func GetRegisterInfo(userID string) (*db.Register, error) {
+ var r db.Register
+ return &r, db.DB.MysqlDB.DefaultGormDB().Table("registers").Where("user_id = ?", userID).Take(&r).Error
+}
+
+func SetPassword(account, password, ex, userID, areaCode, ip string) error {
r := db.Register{
- Account: account,
- Password: password,
- Ex: ex,
- UserID: userID,
- AreaCode: areaCode,
+ Account: account,
+ Password: password,
+ Ex: ex,
+ UserID: userID,
+ RegisterIP: ip,
+ AreaCode: areaCode,
}
return db.DB.MysqlDB.DefaultGormDB().Table("registers").Create(&r).Error
}
@@ -28,3 +35,42 @@ func ResetPassword(account, password string) error {
}
return db.DB.MysqlDB.DefaultGormDB().Table("registers").Where("account = ?", account).Updates(&r).Error
}
+
+func GetRegisterAddFriendList(showNumber, pageNumber int32) ([]string, error) {
+ var IDList []string
+ var err error
+ model := db.DB.MysqlDB.DefaultGormDB().Model(&db.RegisterAddFriend{})
+ if showNumber == 0 {
+ err = model.Pluck("user_id", &IDList).Error
+ } else {
+ err = model.Limit(int(showNumber)).Offset(int(showNumber*(pageNumber-1))).Pluck("user_id", &IDList).Error
+ }
+ return IDList, err
+}
+
+func AddUserRegisterAddFriendIDList(userIDList ...string) error {
+ var list []db.RegisterAddFriend
+ for _, v := range userIDList {
+ list = append(list, db.RegisterAddFriend{UserID: v})
+ }
+ result := db.DB.MysqlDB.DefaultGormDB().Create(list)
+ if int(result.RowsAffected) < len(userIDList) {
+ return errors.New("some line insert failed")
+ }
+ err := result.Error
+ return err
+}
+
+func ReduceUserRegisterAddFriendIDList(userIDList ...string) error {
+ var list []db.RegisterAddFriend
+ for _, v := range userIDList {
+ list = append(list, db.RegisterAddFriend{UserID: v})
+ }
+ err := db.DB.MysqlDB.DefaultGormDB().Delete(list).Error
+ return err
+}
+
+func DeleteAllRegisterAddFriendIDList() error {
+ err := db.DB.MysqlDB.DefaultGormDB().Where("1 = 1").Delete(&db.RegisterAddFriend{}).Error
+ return err
+}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go
index 0a4780011..89526b9de 100644
--- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go
+++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go
@@ -140,14 +140,6 @@ func IsExistGroupMember(groupID, userID string) bool {
return true
}
-func RemoveGroupMember(groupID string, UserID string) error {
- return DeleteGroupMemberByGroupIDAndUserID(groupID, UserID)
-}
-
-func GetMemberInfoByID(groupID string, userID string) (*db.GroupMember, error) {
- return GetGroupMemberInfoByGroupIDAndUserID(groupID, userID)
-}
-
func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]db.GroupMember, error) {
var memberList []db.GroupMember
var err error
diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go
index 19c2b1164..aa4ef29b9 100644
--- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go
+++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go
@@ -1,12 +1,9 @@
package im_mysql_model
import (
- "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/utils"
- "errors"
"fmt"
- "gorm.io/gorm"
"time"
)
@@ -36,32 +33,35 @@ func InsertIntoGroup(groupInfo db.Group) error {
if err != nil {
return err
}
-
return nil
}
-func GetGroupInfoByGroupID(groupId string) (*db.Group, error) {
+func GetGroupInfoByGroupID(groupID string) (*db.Group, error) {
var groupInfo db.Group
- err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupId).Take(&groupInfo).Error
- if err != nil {
- return nil, err
- }
- return &groupInfo, nil
+ err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupID).Take(&groupInfo).Error
+ return &groupInfo, err
}
func SetGroupInfo(groupInfo db.Group) error {
return db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupInfo.GroupID).Updates(&groupInfo).Error
}
-func GetGroupsByName(groupName string, pageNumber, showNumber int32) ([]db.Group, error) {
- var groups []db.Group
- err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where(fmt.Sprintf(" name like '%%%s%%' ", groupName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groups).Error
+type GroupWithNum struct {
+ db.Group
+ MemberCount int `gorm:"column:num"`
+}
+
+func GetGroupsByName(groupName string, pageNumber, showNumber int32) ([]GroupWithNum, error) {
+ var groups []GroupWithNum
+ err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Select("groups.*, (select count(*) from group_members where group_members.group_id=groups.group_id) as num").
+ Where(fmt.Sprintf(" name like '%%%s%%' ", groupName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groups).Error
return groups, err
}
-func GetGroups(pageNumber, showNumber int) ([]db.Group, error) {
- var groups []db.Group
- if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&groups).Error; err != nil {
+func GetGroups(pageNumber, showNumber int) ([]GroupWithNum, error) {
+ var groups []GroupWithNum
+ if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Select("groups.*, (select count(*) from group_members where group_members.group_id=groups.group_id) as num").
+ Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&groups).Error; err != nil {
return groups, err
}
return groups, nil
@@ -78,77 +78,6 @@ func OperateGroupStatus(groupId string, groupStatus int32) error {
return nil
}
-func DeleteGroup(groupId string) error {
- var group db.Group
- var groupMembers []db.GroupMember
- if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupId).Delete(&group).Error; err != nil {
- return err
- }
- if err := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id=?", groupId).Delete(groupMembers).Error; err != nil {
- return err
- }
- return nil
-}
-
-func OperateGroupRole(userId, groupId string, roleLevel int32) (string, string, error) {
- groupMember := db.GroupMember{
- UserID: userId,
- GroupID: groupId,
- }
- updateInfo := db.GroupMember{
- RoleLevel: roleLevel,
- }
- groupMaster := db.GroupMember{}
- var err error
- switch roleLevel {
- case constant.GroupOwner:
- err = db.DB.MysqlDB.DefaultGormDB().Transaction(func(tx *gorm.DB) error {
- result := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id = ? and role_level = ?", groupId, constant.GroupOwner).First(&groupMaster).Updates(&db.GroupMember{
- RoleLevel: constant.GroupOrdinaryUsers,
- })
- if result.Error != nil {
- return result.Error
- }
- if result.RowsAffected == 0 {
- return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
- }
-
- result = db.DB.MysqlDB.DefaultGormDB().Table("group_members").First(&groupMember).Updates(updateInfo)
- if result.Error != nil {
- return result.Error
- }
- if result.RowsAffected == 0 {
- return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
- }
- return nil
- })
-
- case constant.GroupOrdinaryUsers:
- err = db.DB.MysqlDB.DefaultGormDB().Transaction(func(tx *gorm.DB) error {
- result := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id = ? and role_level = ?", groupId, constant.GroupOwner).First(&groupMaster)
- if result.Error != nil {
- return result.Error
- }
- if result.RowsAffected == 0 {
- return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
- }
- if groupMaster.UserID == userId {
- return errors.New(fmt.Sprintf("user %s is master of %s, cant set to ordinary user", userId, groupId))
- } else {
- result = db.DB.MysqlDB.DefaultGormDB().Table("group_members").Find(&groupMember).Updates(updateInfo)
- if result.Error != nil {
- return result.Error
- }
- if result.RowsAffected == 0 {
- return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
- }
- }
- return nil
- })
- }
- return "", "", err
-}
-
func GetGroupsCountNum(group db.Group) (int32, error) {
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where(fmt.Sprintf(" name like '%%%s%%' ", group.GroupName)).Count(&count).Error; err != nil {
@@ -157,30 +86,14 @@ func GetGroupsCountNum(group db.Group) (int32, error) {
return int32(count), nil
}
-func GetGroupById(groupId string) (db.Group, error) {
- group := db.Group{
- GroupID: groupId,
- }
- if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Find(&group).Error; err != nil {
- return group, err
- }
- return group, nil
-}
-
-func GetGroupMaster(groupId string) (db.GroupMember, error) {
- groupMember := db.GroupMember{}
- if err := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("role_level=? and group_id=?", constant.GroupOwner, groupId).Find(&groupMember).Error; err != nil {
- return groupMember, err
- }
- return groupMember, nil
-}
-
func UpdateGroupInfoDefaultZero(groupID string, args map[string]interface{}) error {
return db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id = ? ", groupID).Updates(args).Error
}
-func GetAllGroupIDList() ([]string, error) {
+func GetGroupIDListByGroupType(groupType int) ([]string, error) {
var groupIDList []string
- err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Pluck("group_id", &groupIDList).Error
- return groupIDList, err
+ if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_type = ? ", groupType).Pluck("group_id", &groupIDList).Error; err != nil {
+ return nil, err
+ }
+ return groupIDList, nil
}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/invitation_model.go b/pkg/common/db/mysql_model/im_mysql_model/invitation_model.go
new file mode 100644
index 000000000..3da3d778f
--- /dev/null
+++ b/pkg/common/db/mysql_model/im_mysql_model/invitation_model.go
@@ -0,0 +1,113 @@
+package im_mysql_model
+
+import (
+ "Open_IM/pkg/common/db"
+ "errors"
+ "github.com/jinzhu/gorm"
+ "math/rand"
+ "time"
+)
+
+/**
+ * 批量生成邀请码
+ */
+func BatchCreateInvitationCodes(CodeNums int, CodeLen int) ([]string, error) {
+ i := CodeNums
+ var codes []string
+ for {
+ if i == 0 {
+ break
+ }
+ code := CreateRandomString(CodeLen)
+ invitation := new(db.Invitation)
+ invitation.CreateTime = time.Now()
+ invitation.InvitationCode = code
+ invitation.LastTime = time.Now()
+ invitation.Status = 0
+ invitation.UserID = ""
+ result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Create(&invitation)
+ if result.Error != nil {
+ continue
+ }
+ if result.RowsAffected > 0 {
+ i = i - 1
+ }
+ codes = append(codes, code)
+ }
+ return codes, nil
+}
+
+/**
+ * 检查邀请码
+ */
+func CheckInvitationCode(code string) error {
+ var invitationCode db.Invitation
+ err := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=?", code).Take(&invitationCode).Error
+ if err != nil {
+ return err
+ }
+ if invitationCode.InvitationCode != code {
+ return errors.New("邀请码不存在")
+ }
+ if invitationCode.Status != 0 {
+ return errors.New("邀请码已经被使用")
+ }
+ return nil
+}
+
+/**
+ * 尝试加锁模式解决邀请码抢占的问题
+ */
+func TryLockInvitationCode(Code string, UserID string) bool {
+ Data := make(map[string]interface{}, 0)
+ Data["user_id"] = UserID
+ Data["status"] = 1
+ Data["last_time"] = time.Now()
+ result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=? and user_id=? and status=?", Code, "", 0).Updates(Data)
+ if result.Error != nil {
+ return false
+ }
+ return result.RowsAffected > 0
+}
+
+/**
+ * 完成邀请码的状态
+ */
+func FinishInvitationCode(Code string, UserId string) bool {
+ Data := make(map[string]interface{}, 0)
+ Data["status"] = 2
+ result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=? and user_id=? and status=?", Code, UserId, 1).Updates(Data)
+ if result.Error != nil {
+ return false
+ }
+ return result.RowsAffected > 0
+}
+
+func GetInvitationCode(code string) (*db.Invitation, error) {
+ invitation := &db.Invitation{
+ InvitationCode: code,
+ }
+ err := db.DB.MysqlDB.DefaultGormDB().Model(invitation).Find(invitation).Error
+ if gorm.IsRecordNotFoundError(err) {
+ return invitation, nil
+ }
+ return invitation, err
+}
+
+func CreateRandomString(strlen int) string {
+ str := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ bytes := []byte(str)
+ result := []byte{}
+ r := rand.New(rand.NewSource(time.Now().UnixNano()))
+ for i := 0; i < strlen; i++ {
+ result = append(result, bytes[r.Intn(len(bytes))])
+ }
+ return string(result)
+}
+
+func GetInvitationCodes(showNumber, pageNumber, status int32) ([]db.Invitation, error) {
+ var invitationList []db.Invitation
+ err := db.DB.MysqlDB.DefaultGormDB().Model(db.Invitation{}).Limit(int(showNumber)).Offset(int(showNumber*(pageNumber-1))).Where("status=?", status).
+ Order("create_time desc").Find(&invitationList).Error
+ return invitationList, err
+}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/ip_model.go b/pkg/common/db/mysql_model/im_mysql_model/ip_model.go
new file mode 100644
index 000000000..cea844496
--- /dev/null
+++ b/pkg/common/db/mysql_model/im_mysql_model/ip_model.go
@@ -0,0 +1,76 @@
+package im_mysql_model
+
+import (
+ "Open_IM/pkg/common/db"
+ "time"
+)
+
+func IsLimitRegisterIp(RegisterIp string) (bool, error) {
+ //如果已经存在则限制
+ var count int64
+ if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_register=? and limit_time>now()", RegisterIp, 1).Count(&count).Error; err != nil {
+ return false, err
+ }
+ return count > 0, nil
+}
+
+func IsLimitLoginIp(LoginIp string) (bool, error) {
+ //如果已经存在则限制
+ var count int64
+ if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_login=? and limit_time>now()", LoginIp, 1).Count(&count).Error; err != nil {
+ return false, err
+ }
+ return count > 0, nil
+}
+
+func IsLimitUserLoginIp(userID string, LoginIp string) (bool, error) {
+ //如果已经存在则放行
+ var count int64
+ if err := db.DB.MysqlDB.DefaultGormDB().Table("user_ip_limits").Where("ip=? and user_id=?", LoginIp, userID).Count(&count).Error; err != nil {
+ return false, err
+ }
+ return count == 0, nil
+}
+
+func QueryIPLimits(ip string) (*db.IpLimit, error) {
+ var ipLimit db.IpLimit
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Where("ip=?", ip).First(&ipLimit).Error
+ return &ipLimit, err
+}
+
+func QueryUserIPLimits(ip string) ([]db.UserIpLimit, error) {
+ var ips []db.UserIpLimit
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("ip=?", ip).Find(&ips).Error
+ return ips, err
+}
+
+func InsertOneIntoIpLimits(ipLimits db.IpLimit) error {
+ return db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Create(ipLimits).Error
+}
+
+func DeleteOneFromIpLimits(ip string) error {
+ ipLimits := &db.IpLimit{Ip: ip}
+ return db.DB.MysqlDB.DefaultGormDB().Model(ipLimits).Where("ip=?", ip).Delete(ipLimits).Error
+}
+
+func GetIpLimitsLoginByUserID(userID string) ([]db.UserIpLimit, error) {
+ var ips []db.UserIpLimit
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("user_id=?", userID).Find(&ips).Error
+ return ips, err
+}
+
+func InsertUserIpLimitsLogin(userIp *db.UserIpLimit) error {
+ userIp.CreateTime = time.Now()
+ return db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Create(userIp).Error
+}
+
+func DeleteUserIpLimitsLogin(userID, ip string) error {
+ userIp := db.UserIpLimit{UserID: userID, Ip: ip}
+ return db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Delete(&userIp).Error
+}
+
+func GetRegisterUserNum(ip string) ([]string, error) {
+ var userIDList []string
+ err := db.DB.MysqlDB.DefaultGormDB().Model(&db.Register{}).Where("register_ip=?", ip).Pluck("user_id", &userIDList).Error
+ return userIDList, err
+}
diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go
index ddc4a93cf..9e132ad03 100644
--- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go
+++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go
@@ -6,6 +6,7 @@ import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/utils"
"fmt"
+ "strconv"
"time"
)
@@ -42,6 +43,9 @@ func UserRegister(user db.User) error {
if user.Birth.Unix() < 0 {
user.Birth = utils.UnixSecondToTime(0)
}
+ user.LastLoginTime = time.Now()
+ user.LoginTimes = 0
+ user.LastLoginIp = user.CreateIp
err := db.DB.MysqlDB.DefaultGormDB().Table("users").Create(&user).Error
if err != nil {
return err
@@ -69,6 +73,12 @@ func GetUserByUserID(userID string) (*db.User, error) {
return &user, nil
}
+func GetUsersByUserIDList(userIDList []string) ([]*db.User, error) {
+ var userList []*db.User
+ err := db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id in (?)", userIDList).Find(&userList).Error
+ return userList, err
+}
+
func GetUserNameByUserID(userID string) (string, error) {
var user db.User
err := db.DB.MysqlDB.DefaultGormDB().Table("users").Select("name").Where("user_id=?", userID).First(&user).Error
@@ -114,13 +124,31 @@ func GetUsers(showNumber, pageNumber int32) ([]db.User, error) {
return users, err
}
-func AddUser(userId, phoneNumber, name string) error {
+func AddUser(userId string, phoneNumber string, name string, email string, gender string, photo string, birth string) error {
+ _gender, _err := strconv.Atoi(gender)
+ if _err != nil {
+ _gender = 0
+ }
+ _birth, _err := time.ParseInLocation("2006-01-02", birth, time.Local)
+ if _err != nil {
+ _birth = time.Now()
+ }
user := db.User{
- PhoneNumber: phoneNumber,
- Birth: time.Now(),
- CreateTime: time.Now(),
- UserID: userId,
- Nickname: name,
+ UserID: userId,
+ Nickname: name,
+ FaceURL: photo,
+ Gender: int32(_gender),
+ PhoneNumber: phoneNumber,
+ Birth: _birth,
+ Email: email,
+ Ex: "",
+ CreateTime: time.Now(),
+ CreateIp: "",
+ LastLoginTime: time.Now(),
+ LastLoginIp: "",
+ LoginTimes: 0,
+ LoginLimit: 0,
+ InvitationCode: "",
}
result := db.DB.MysqlDB.DefaultGormDB().Table("users").Create(&user)
return result.Error
@@ -130,7 +158,7 @@ func UserIsBlock(userId string) (bool, error) {
var user db.BlackList
rows := db.DB.MysqlDB.DefaultGormDB().Table("black_lists").Where("uid=?", userId).First(&user).RowsAffected
if rows >= 1 {
- return true, nil
+ return user.EndDisableTime.After(time.Now()), nil
}
return false, nil
}
@@ -151,6 +179,9 @@ func BlockUser(userId, endDisableTime string) error {
db.DB.MysqlDB.DefaultGormDB().Table("black_lists").Where("uid=?", userId).First(&blockUser)
if blockUser.UserId != "" {
db.DB.MysqlDB.DefaultGormDB().Model(&blockUser).Where("uid=?", blockUser.UserId).Update("end_disable_time", end)
+ if user.LoginLimit != 2 {
+ db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id=?", blockUser.UserId).Update("login_limit", 2)
+ }
return nil
}
blockUser = db.BlackList{
@@ -159,11 +190,20 @@ func BlockUser(userId, endDisableTime string) error {
EndDisableTime: end,
}
result := db.DB.MysqlDB.DefaultGormDB().Create(&blockUser)
+ if result.Error == nil {
+ if user.LoginLimit != 2 {
+ db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id=?", blockUser.UserId).Update("login_limit", 2)
+ }
+ }
return result.Error
}
func UnBlockUser(userId string) error {
- return db.DB.MysqlDB.DefaultGormDB().Where("uid=?", userId).Delete(&db.BlackList{}).Error
+ err := db.DB.MysqlDB.DefaultGormDB().Where("uid=?", userId).Delete(&db.BlackList{}).Error
+ if err != nil {
+ return err
+ }
+ return db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id=?", userId).Update("login_limit", 0).Error
}
type BlockUserInfo struct {
@@ -187,8 +227,12 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) {
return blockUserInfo, err
}
blockUserInfo.User.UserID = user.UserID
- blockUserInfo.User.FaceURL = user.UserID
+ blockUserInfo.User.FaceURL = user.FaceURL
blockUserInfo.User.Nickname = user.Nickname
+ blockUserInfo.User.Birth = user.Birth
+ blockUserInfo.User.PhoneNumber = user.PhoneNumber
+ blockUserInfo.User.Email = user.Email
+ blockUserInfo.User.Gender = user.Gender
blockUserInfo.BeginDisableTime = blockUser.BeginDisableTime
blockUserInfo.EndDisableTime = blockUser.EndDisableTime
return blockUserInfo, nil
@@ -205,9 +249,13 @@ func GetBlockUsers(showNumber, pageNumber int32) ([]BlockUserInfo, error) {
if err := db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id=?", blockUser.UserId).First(&user).Error; err == nil {
blockUserInfos = append(blockUserInfos, BlockUserInfo{
User: db.User{
- UserID: user.UserID,
- Nickname: user.Nickname,
- FaceURL: user.FaceURL,
+ UserID: user.UserID,
+ Nickname: user.Nickname,
+ FaceURL: user.FaceURL,
+ Birth: user.Birth,
+ PhoneNumber: user.PhoneNumber,
+ Email: user.Email,
+ Gender: user.Gender,
},
BeginDisableTime: blockUser.BeginDisableTime,
EndDisableTime: blockUser.EndDisableTime,
diff --git a/pkg/common/db/rocks_cache/rocks_cache.go b/pkg/common/db/rocks_cache/rocks_cache.go
index 86ce3dea6..a510b67a0 100644
--- a/pkg/common/db/rocks_cache/rocks_cache.go
+++ b/pkg/common/db/rocks_cache/rocks_cache.go
@@ -8,7 +8,11 @@ import (
"Open_IM/pkg/utils"
"context"
"encoding/json"
+ "errors"
"fmt"
+ "math/big"
+ "sort"
+ "strconv"
"time"
)
@@ -26,6 +30,10 @@ const (
allDepartmentCache = "ALL_DEPARTMENT_CACHE:"
allDepartmentMemberCache = "ALL_DEPARTMENT_MEMBER_CACHE:"
joinedSuperGroupListCache = "JOINED_SUPER_GROUP_LIST_CACHE:"
+ groupMemberListHashCache = "GROUP_MEMBER_LIST_HASH_CACHE:"
+ groupMemberNumCache = "GROUP_MEMBER_NUM_CACHE:"
+ conversationCache = "CONVERSATION_CACHE:"
+ conversationIDListCache = "CONVERSATION_ID_LIST_CACHE:"
)
func init() {
@@ -207,6 +215,50 @@ func DelGroupMemberInfoFromCache(groupID, userID string) error {
return db.DB.Rc.TagAsDeleted(groupMemberInfoCache + groupID + "-" + userID)
}
+func GetGroupMembersInfoFromCache(count, offset int32, groupID string) ([]*db.GroupMember, error) {
+ groupMemberIDList, err := GetGroupMemberIDListFromCache(groupID)
+ if err != nil {
+ return nil, err
+ }
+ if count < 0 || offset < 0 {
+ return nil, nil
+ }
+ var groupMemberList []*db.GroupMember
+ var start, stop int32
+ start = offset
+ stop = offset + count
+ l := int32(len(groupMemberIDList))
+ if start > stop {
+ return nil, nil
+ }
+ if start >= l {
+ return nil, nil
+ }
+ if count != 0 {
+ if stop >= l {
+ stop = l
+ }
+ groupMemberIDList = groupMemberIDList[start:stop]
+ } else {
+ if l < 1000 {
+ stop = l
+ } else {
+ stop = 1000
+ }
+ groupMemberIDList = groupMemberIDList[start:stop]
+ }
+ //log.NewDebug("", utils.GetSelfFuncName(), "ID list: ", groupMemberIDList)
+ for _, userID := range groupMemberIDList {
+ groupMembers, err := GetGroupMemberInfoFromCache(groupID, userID)
+ if err != nil {
+ log.NewError("", utils.GetSelfFuncName(), err.Error(), groupID, userID)
+ continue
+ }
+ groupMemberList = append(groupMemberList, groupMembers)
+ }
+ return groupMemberList, nil
+}
+
func GetAllGroupMembersInfoFromCache(groupID string) ([]*db.GroupMember, error) {
getGroupMemberInfo := func() (string, error) {
groupMembers, err := imdb.GetGroupMemberListByGroupID(groupID)
@@ -323,10 +375,13 @@ func GetJoinedSuperGroupListFromCache(userID string) ([]string, error) {
if err != nil {
return "", utils.Wrap(err, "")
}
+ if len(userToSuperGroup.GroupIDList) == 0 {
+ return "", errors.New("GroupIDList == 0")
+ }
bytes, err := json.Marshal(userToSuperGroup.GroupIDList)
return string(bytes), utils.Wrap(err, "")
}
- joinedSuperGroupListStr, err := db.DB.Rc.Fetch(joinedSuperGroupListCache+userID, time.Second, getJoinedSuperGroupIDList)
+ joinedSuperGroupListStr, err := db.DB.Rc.Fetch(joinedSuperGroupListCache+userID, time.Second*30*60, getJoinedSuperGroupIDList)
var joinedSuperGroupList []string
err = json.Unmarshal([]byte(joinedSuperGroupListStr), &joinedSuperGroupList)
return joinedSuperGroupList, err
@@ -337,10 +392,124 @@ func DelJoinedSuperGroupIDListFromCache(userID string) error {
return err
}
-func GetSuperGroupMemberIDListFromCache(groupID string) ([]string, error) {
- return GetGroupMemberIDListFromCache(groupID)
+func GetGroupMemberListHashFromCache(groupID string) (uint64, error) {
+ generateHash := func() (string, error) {
+ groupMemberIDList, err := GetGroupMemberIDListFromCache(groupID)
+ if err != nil {
+ return "", utils.Wrap(err, "GetGroupMemberIDListFromCache failed")
+ }
+ sort.Strings(groupMemberIDList)
+ var all string
+ for _, v := range groupMemberIDList {
+ all += v
+ }
+ bi := big.NewInt(0)
+ bi.SetString(utils.Md5(all)[0:8], 16)
+ return strconv.Itoa(int(bi.Uint64())), nil
+ }
+ hashCode, err := db.DB.Rc.Fetch(groupMemberListHashCache+groupID, time.Second*30*60, generateHash)
+ hashCodeUint64, err := strconv.Atoi(hashCode)
+ return uint64(hashCodeUint64), err
}
-func DelSuperGroupMemberIDListFromCache(groupID string) error {
- return DelGroupMemberIDListFromCache(groupID)
+func DelGroupMemberListHashFromCache(groupID string) error {
+ err := db.DB.Rc.TagAsDeleted(groupMemberListHashCache + groupID)
+ return err
+}
+
+func GetGroupMemberNumFromCache(groupID string) (int64, error) {
+ getGroupMemberNum := func() (string, error) {
+ num, err := imdb.GetGroupMemberNumByGroupID(groupID)
+ if err != nil {
+ return "", utils.Wrap(err, "")
+ }
+ return strconv.Itoa(int(num)), nil
+ }
+ groupMember, err := db.DB.Rc.Fetch(groupMemberNumCache+groupID, time.Second*30*60, getGroupMemberNum)
+ num, err := strconv.Atoi(groupMember)
+ return int64(num), err
+}
+
+func DelGroupMemberNumFromCache(groupID string) error {
+ return db.DB.Rc.TagAsDeleted(groupMemberNumCache + groupID)
+}
+
+func GetUserConversationIDListFromCache(userID string) ([]string, error) {
+ getConversationIDList := func() (string, error) {
+ conversationIDList, err := imdb.GetConversationIDListByUserID(userID)
+ if err != nil {
+ return "", utils.Wrap(err, "getConversationIDList failed")
+ }
+ log.NewDebug("", utils.GetSelfFuncName(), conversationIDList)
+ bytes, err := json.Marshal(conversationIDList)
+ return string(bytes), utils.Wrap(err, "")
+ }
+ conversationIDListStr, err := db.DB.Rc.Fetch(conversationIDListCache+userID, time.Second*30*60, getConversationIDList)
+ var conversationIDList []string
+ err = json.Unmarshal([]byte(conversationIDListStr), &conversationIDList)
+ if err != nil {
+ return nil, utils.Wrap(err, "")
+ }
+ return conversationIDList, nil
+}
+
+func DelUserConversationIDListFromCache(userID string) error {
+ return utils.Wrap(db.DB.Rc.TagAsDeleted(conversationIDListCache+userID), "DelUserConversationIDListFromCache err")
+}
+
+func GetConversationFromCache(ownerUserID, conversationID string) (*db.Conversation, error) {
+ getConversation := func() (string, error) {
+ conversation, err := imdb.GetConversation(ownerUserID, conversationID)
+ if err != nil {
+ return "", utils.Wrap(err, "get failed")
+ }
+ bytes, err := json.Marshal(conversation)
+ if err != nil {
+ return "", utils.Wrap(err, "Marshal failed")
+ }
+ return string(bytes), nil
+ }
+ conversationStr, err := db.DB.Rc.Fetch(conversationCache+ownerUserID+":"+conversationID, time.Second*30*60, getConversation)
+ if err != nil {
+ return nil, utils.Wrap(err, "Fetch failed")
+ }
+ conversation := db.Conversation{}
+ err = json.Unmarshal([]byte(conversationStr), &conversation)
+ if err != nil {
+ return nil, utils.Wrap(err, "Unmarshal failed")
+ }
+ return &conversation, nil
+}
+
+func GetConversationsFromCache(ownerUserID string, conversationIDList []string) ([]db.Conversation, error) {
+ var conversationList []db.Conversation
+ for _, conversationID := range conversationIDList {
+ conversation, err := GetConversationFromCache(ownerUserID, conversationID)
+ if err != nil {
+ return nil, utils.Wrap(err, "GetConversationFromCache failed")
+ }
+ conversationList = append(conversationList, *conversation)
+ }
+ return conversationList, nil
+}
+
+func GetUserAllConversationList(ownerUserID string) ([]db.Conversation, error) {
+ IDList, err := GetUserConversationIDListFromCache(ownerUserID)
+ if err != nil {
+ return nil, err
+ }
+ var conversationList []db.Conversation
+ log.NewDebug("", utils.GetSelfFuncName(), IDList)
+ for _, conversationID := range IDList {
+ conversation, err := GetConversationFromCache(ownerUserID, conversationID)
+ if err != nil {
+ return nil, utils.Wrap(err, "GetConversationFromCache failed")
+ }
+ conversationList = append(conversationList, *conversation)
+ }
+ return conversationList, nil
+}
+
+func DelConversationFromCache(ownerUserID, conversationID string) error {
+ return utils.Wrap(db.DB.Rc.TagAsDeleted(conversationCache+ownerUserID+":"+conversationID), "DelConversationFromCache err")
}
diff --git a/pkg/common/log/logrus.go b/pkg/common/log/logrus.go
index caf4c9126..b1f26855a 100644
--- a/pkg/common/log/logrus.go
+++ b/pkg/common/log/logrus.go
@@ -3,6 +3,8 @@ package log
import (
"Open_IM/pkg/common/config"
"bufio"
+
+ //"bufio"
"fmt"
"os"
"time"
diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go
index 476c26a70..20942faf2 100644
--- a/pkg/common/token_verify/jwt_token.go
+++ b/pkg/common/token_verify/jwt_token.go
@@ -6,9 +6,10 @@ import (
commonDB "Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
+ "time"
+
go_redis "github.com/go-redis/redis/v8"
"github.com/golang-jwt/jwt/v4"
- "time"
)
//var (
@@ -27,13 +28,14 @@ type Claims struct {
func BuildClaims(uid, platform string, ttl int64) Claims {
now := time.Now()
+ before := now.Add(-time.Minute * 5)
return Claims{
UID: uid,
Platform: platform,
RegisteredClaims: jwt.RegisteredClaims{
ExpiresAt: jwt.NewNumericDate(now.Add(time.Duration(ttl*24) * time.Hour)), //Expiration time
IssuedAt: jwt.NewNumericDate(now), //Issuing time
- NotBefore: jwt.NewNumericDate(now), //Begin Effective time
+ NotBefore: jwt.NewNumericDate(before), //Begin Effective time
}}
}
@@ -99,23 +101,22 @@ func GetClaimFromToken(tokensString string) (*Claims, error) {
if err != nil {
if ve, ok := err.(*jwt.ValidationError); ok {
if ve.Errors&jwt.ValidationErrorMalformed != 0 {
- return nil, constant.ErrTokenMalformed
+ return nil, utils.Wrap(constant.ErrTokenMalformed, "")
} else if ve.Errors&jwt.ValidationErrorExpired != 0 {
- return nil, constant.ErrTokenExpired
+ return nil, utils.Wrap(constant.ErrTokenExpired, "")
} else if ve.Errors&jwt.ValidationErrorNotValidYet != 0 {
- return nil, constant.ErrTokenNotValidYet
+ return nil, utils.Wrap(constant.ErrTokenNotValidYet, "")
} else {
- return nil, constant.ErrTokenUnknown
+ return nil, utils.Wrap(constant.ErrTokenUnknown, "")
}
} else {
- return nil, constant.ErrTokenNotValidYet
+ return nil, utils.Wrap(constant.ErrTokenNotValidYet, "")
}
} else {
if claims, ok := token.Claims.(*Claims); ok && token.Valid {
- //log.NewDebug("", claims.UID, claims.Platform)
return claims, nil
}
- return nil, constant.ErrTokenNotValidYet
+ return nil, utils.Wrap(constant.ErrTokenNotValidYet, "")
}
}
diff --git a/pkg/grpc-etcdv3/getcdv3/register.go b/pkg/grpc-etcdv3/getcdv3/register.go
index d30d3a3a7..aa3ba3072 100644
--- a/pkg/grpc-etcdv3/getcdv3/register.go
+++ b/pkg/grpc-etcdv3/getcdv3/register.go
@@ -38,8 +38,7 @@ func RegisterEtcd4Unique(schema, etcdAddr, myHost string, myPort int, serviceNam
}
func GetTarget(schema, myHost string, myPort int, serviceName string) string {
- serviceName = serviceName + ":" + net.JoinHostPort(myHost, strconv.Itoa(myPort))
- return serviceName
+ return GetPrefix4Unique(schema, serviceName) + ":" + net.JoinHostPort(myHost, strconv.Itoa(myPort)) + "/"
}
//etcdAddr separated by commas
diff --git a/pkg/grpc-etcdv3/getcdv3/resolver.go b/pkg/grpc-etcdv3/getcdv3/resolver.go
index b72df5fc9..d95909b6d 100644
--- a/pkg/grpc-etcdv3/getcdv3/resolver.go
+++ b/pkg/grpc-etcdv3/getcdv3/resolver.go
@@ -1,21 +1,24 @@
package getcdv3
import (
+ "Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"context"
"fmt"
+
"go.etcd.io/etcd/api/v3/mvccpb"
clientv3 "go.etcd.io/etcd/client/v3"
//"go.etcd.io/etcd/mvcc/mvccpb"
//"google.golang.org/genproto/googleapis/ads/googleads/v1/services"
- "google.golang.org/grpc"
- "google.golang.org/grpc/balancer/roundrobin"
- "google.golang.org/grpc/resolver"
"strings"
"sync"
"time"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/balancer/roundrobin"
+ "google.golang.org/grpc/resolver"
)
type Resolver struct {
@@ -66,7 +69,7 @@ func (r1 *Resolver) ResolveNow(rn resolver.ResolveNowOptions) {
func (r1 *Resolver) Close() {
}
-func GetConn(schema, etcdaddr, serviceName string, operationID string) *grpc.ClientConn {
+func getConn(schema, etcdaddr, serviceName string, operationID string) *grpc.ClientConn {
rwNameResolverMutex.RLock()
r, ok := nameResolver[schema+serviceName]
rwNameResolverMutex.RUnlock()
@@ -96,6 +99,99 @@ func GetConn(schema, etcdaddr, serviceName string, operationID string) *grpc.Cli
return r.grpcClientConn
}
+func GetConfigConn(serviceName string, operationID string) *grpc.ClientConn {
+ rpcRegisterIP := config.Config.RpcRegisterIP
+ var err error
+ if config.Config.RpcRegisterIP == "" {
+ rpcRegisterIP, err = utils.GetLocalIP()
+ if err != nil {
+ log.Error(operationID, "GetLocalIP failed ", err.Error())
+ return nil
+ }
+ }
+
+ var configPortList []int
+ //1
+ if config.Config.RpcRegisterName.OpenImUserName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImUserPort
+ }
+ //2
+ if config.Config.RpcRegisterName.OpenImFriendName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImFriendPort
+ }
+ //3
+ if config.Config.RpcRegisterName.OpenImMsgName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImMessagePort
+ }
+ //4
+ if config.Config.RpcRegisterName.OpenImPushName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImPushPort
+ }
+ //5
+ if config.Config.RpcRegisterName.OpenImRelayName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImMessageGatewayPort
+ }
+ //6
+ if config.Config.RpcRegisterName.OpenImGroupName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImGroupPort
+ }
+ //7
+ if config.Config.RpcRegisterName.OpenImAuthName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImAuthPort
+ }
+ //8
+ if config.Config.RpcRegisterName.OpenImMessageCMSName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImMessageCmsPort
+ }
+ //9
+ if config.Config.RpcRegisterName.OpenImAdminCMSName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImAdminCmsPort
+ }
+ //10
+ if config.Config.RpcRegisterName.OpenImOfficeName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImOfficePort
+ }
+ //11
+ if config.Config.RpcRegisterName.OpenImOrganizationName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImOrganizationPort
+ }
+ //12
+ if config.Config.RpcRegisterName.OpenImConversationName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImConversationPort
+ }
+ //13
+ if config.Config.RpcRegisterName.OpenImCacheName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImCachePort
+ }
+ //14
+ if config.Config.RpcRegisterName.OpenImRealTimeCommName == serviceName {
+ configPortList = config.Config.RpcPort.OpenImRealTimeCommPort
+ }
+ if len(configPortList) == 0 {
+ log.Error(operationID, "len(configPortList) == 0 ")
+ return nil
+ }
+ target := rpcRegisterIP + ":" + utils.Int32ToString(int32(configPortList[0]))
+ log.Info(operationID, "rpcRegisterIP ", rpcRegisterIP, " port ", configPortList, " grpc target: ", target, " serviceName: ", serviceName)
+ conn, err := grpc.Dial(target, grpc.WithInsecure())
+ if err != nil {
+ log.Error(operationID, "grpc.Dail failed ", err.Error())
+ return nil
+ }
+ log.NewDebug(operationID, utils.GetSelfFuncName(), serviceName, conn)
+ return conn
+}
+
+func GetDefaultConn(schema, etcdaddr, serviceName string, operationID string) *grpc.ClientConn {
+ con := getConn(schema, etcdaddr, serviceName, operationID)
+ if con != nil {
+ return con
+ }
+ log.NewWarn(operationID, utils.GetSelfFuncName(), "conn is nil !!!!!", schema, etcdaddr, serviceName, operationID)
+ con = GetConfigConn(serviceName, operationID)
+ return con
+}
+
func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {
if r.cli == nil {
return nil, fmt.Errorf("etcd clientv3 client failed, etcd:%s", target)
@@ -181,7 +277,45 @@ func (r *Resolver) watch(prefix string, addrList []resolver.Address) {
}
}
-func GetConn4Unique(schema, etcdaddr, servicename string) []*grpc.ClientConn {
+func GetDefaultGatewayConn4Unique(schema, etcdaddr, operationID string) []*grpc.ClientConn {
+ grpcConns := getConn4Unique(schema, etcdaddr, config.Config.RpcRegisterName.OpenImRelayName)
+ if len(grpcConns) > 0 {
+ return grpcConns
+ }
+ log.NewWarn(operationID, utils.GetSelfFuncName(), " len(grpcConns) < 0 ", schema, etcdaddr, config.Config.RpcRegisterName.OpenImRelayName)
+ grpcConns = GetDefaultGatewayConn4UniqueFromcfg(operationID)
+ log.NewDebug(operationID, utils.GetSelfFuncName(), config.Config.RpcRegisterName.OpenImRelayName, grpcConns)
+ return grpcConns
+}
+
+func GetDefaultGatewayConn4UniqueFromcfg(operationID string) []*grpc.ClientConn {
+ rpcRegisterIP := config.Config.RpcRegisterIP
+ var err error
+ if config.Config.RpcRegisterIP == "" {
+ rpcRegisterIP, err = utils.GetLocalIP()
+ if err != nil {
+ log.Error("", "GetLocalIP failed ", err.Error())
+ return nil
+ }
+ }
+ var conns []*grpc.ClientConn
+ configPortList := config.Config.RpcPort.OpenImMessageGatewayPort
+ for _, port := range configPortList {
+ target := rpcRegisterIP + ":" + utils.Int32ToString(int32(port))
+ log.Info(operationID, "rpcRegisterIP ", rpcRegisterIP, " port ", configPortList, " grpc target: ", target, " serviceName: ", "msgGateway")
+ conn, err := grpc.Dial(target, grpc.WithInsecure())
+ if err != nil {
+ log.Error(operationID, "grpc.Dail failed ", err.Error())
+ continue
+ }
+ conns = append(conns, conn)
+
+ }
+ return conns
+
+}
+
+func getConn4Unique(schema, etcdaddr, servicename string) []*grpc.ClientConn {
gEtcdCli, err := clientv3.New(clientv3.Config{Endpoints: strings.Split(etcdaddr, ",")})
if err != nil {
log.Error("clientv3.New failed", err.Error())
@@ -215,7 +349,7 @@ func GetConn4Unique(schema, etcdaddr, servicename string) []*grpc.ClientConn {
allConn := make([]*grpc.ClientConn, 0)
for _, v := range allService {
- r := GetConn(schema, etcdaddr, v, "0")
+ r := getConn(schema, etcdaddr, v, "0")
allConn = append(allConn, r)
}
@@ -228,7 +362,7 @@ var (
)
func GetconnFactory(schema, etcdaddr, servicename string) (*grpc.ClientConn, error) {
- c := GetConn(schema, etcdaddr, servicename, "0")
+ c := getConn(schema, etcdaddr, servicename, "0")
if c != nil {
return c, nil
} else {
diff --git a/pkg/proto/admin_cms/admin_cms.pb.go b/pkg/proto/admin_cms/admin_cms.pb.go
index 890f409a9..06522567a 100644
--- a/pkg/proto/admin_cms/admin_cms.pb.go
+++ b/pkg/proto/admin_cms/admin_cms.pb.go
@@ -1,284 +1,452 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.27.1
-// protoc v3.15.5
// source: admin_cms/admin_cms.proto
-package admin_cms
+package admin_cms // import "./admin_cms"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import sdk_ws "Open_IM/pkg/proto/sdk_ws"
import (
- context "context"
+ context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
)
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AdminLoginReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
- AdminID string `protobuf:"bytes,2,opt,name=AdminID,proto3" json:"AdminID,omitempty"`
- Secret string `protobuf:"bytes,3,opt,name=Secret,proto3" json:"Secret,omitempty"`
+ OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"`
+ AdminID string `protobuf:"bytes,2,opt,name=AdminID" json:"AdminID,omitempty"`
+ Secret string `protobuf:"bytes,3,opt,name=Secret" json:"Secret,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (x *AdminLoginReq) Reset() {
- *x = AdminLoginReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_admin_cms_admin_cms_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *AdminLoginReq) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*AdminLoginReq) ProtoMessage() {}
-
-func (x *AdminLoginReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_cms_admin_cms_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use AdminLoginReq.ProtoReflect.Descriptor instead.
+func (m *AdminLoginReq) Reset() { *m = AdminLoginReq{} }
+func (m *AdminLoginReq) String() string { return proto.CompactTextString(m) }
+func (*AdminLoginReq) ProtoMessage() {}
func (*AdminLoginReq) Descriptor() ([]byte, []int) {
- return file_admin_cms_admin_cms_proto_rawDescGZIP(), []int{0}
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{0}
+}
+func (m *AdminLoginReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AdminLoginReq.Unmarshal(m, b)
+}
+func (m *AdminLoginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AdminLoginReq.Marshal(b, m, deterministic)
+}
+func (dst *AdminLoginReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AdminLoginReq.Merge(dst, src)
+}
+func (m *AdminLoginReq) XXX_Size() int {
+ return xxx_messageInfo_AdminLoginReq.Size(m)
+}
+func (m *AdminLoginReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_AdminLoginReq.DiscardUnknown(m)
}
-func (x *AdminLoginReq) GetOperationID() string {
- if x != nil {
- return x.OperationID
+var xxx_messageInfo_AdminLoginReq proto.InternalMessageInfo
+
+func (m *AdminLoginReq) GetOperationID() string {
+ if m != nil {
+ return m.OperationID
}
return ""
}
-func (x *AdminLoginReq) GetAdminID() string {
- if x != nil {
- return x.AdminID
+func (m *AdminLoginReq) GetAdminID() string {
+ if m != nil {
+ return m.AdminID
}
return ""
}
-func (x *AdminLoginReq) GetSecret() string {
- if x != nil {
- return x.Secret
+func (m *AdminLoginReq) GetSecret() string {
+ if m != nil {
+ return m.Secret
}
return ""
}
type AdminLoginResp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
+ Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (x *AdminLoginResp) Reset() {
- *x = AdminLoginResp{}
- if protoimpl.UnsafeEnabled {
- mi := &file_admin_cms_admin_cms_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *AdminLoginResp) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*AdminLoginResp) ProtoMessage() {}
-
-func (x *AdminLoginResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_cms_admin_cms_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use AdminLoginResp.ProtoReflect.Descriptor instead.
+func (m *AdminLoginResp) Reset() { *m = AdminLoginResp{} }
+func (m *AdminLoginResp) String() string { return proto.CompactTextString(m) }
+func (*AdminLoginResp) ProtoMessage() {}
func (*AdminLoginResp) Descriptor() ([]byte, []int) {
- return file_admin_cms_admin_cms_proto_rawDescGZIP(), []int{1}
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{1}
+}
+func (m *AdminLoginResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AdminLoginResp.Unmarshal(m, b)
+}
+func (m *AdminLoginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AdminLoginResp.Marshal(b, m, deterministic)
+}
+func (dst *AdminLoginResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AdminLoginResp.Merge(dst, src)
+}
+func (m *AdminLoginResp) XXX_Size() int {
+ return xxx_messageInfo_AdminLoginResp.Size(m)
+}
+func (m *AdminLoginResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_AdminLoginResp.DiscardUnknown(m)
}
-func (x *AdminLoginResp) GetToken() string {
- if x != nil {
- return x.Token
+var xxx_messageInfo_AdminLoginResp proto.InternalMessageInfo
+
+func (m *AdminLoginResp) GetToken() string {
+ if m != nil {
+ return m.Token
}
return ""
}
-var File_admin_cms_admin_cms_proto protoreflect.FileDescriptor
-
-var file_admin_cms_admin_cms_proto_rawDesc = []byte{
- 0x0a, 0x19, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x22, 0x63, 0x0a, 0x0d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c,
- 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x6d,
- 0x69, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x6d, 0x69,
- 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x26, 0x0a, 0x0e, 0x41,
- 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a,
- 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x32, 0x4d, 0x0a, 0x08, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x4d, 0x53, 0x12,
- 0x41, 0x0a, 0x0a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c,
- 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f,
- 0x63, 0x6d, 0x73, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x42, 0x17, 0x5a, 0x15, 0x2e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d,
- 0x73, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
+type AddUserRegisterAddFriendIDListReq struct {
+ OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
+ UserIDList []string `protobuf:"bytes,2,rep,name=userIDList" json:"userIDList,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-var (
- file_admin_cms_admin_cms_proto_rawDescOnce sync.Once
- file_admin_cms_admin_cms_proto_rawDescData = file_admin_cms_admin_cms_proto_rawDesc
-)
-
-func file_admin_cms_admin_cms_proto_rawDescGZIP() []byte {
- file_admin_cms_admin_cms_proto_rawDescOnce.Do(func() {
- file_admin_cms_admin_cms_proto_rawDescData = protoimpl.X.CompressGZIP(file_admin_cms_admin_cms_proto_rawDescData)
- })
- return file_admin_cms_admin_cms_proto_rawDescData
+func (m *AddUserRegisterAddFriendIDListReq) Reset() { *m = AddUserRegisterAddFriendIDListReq{} }
+func (m *AddUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
+func (*AddUserRegisterAddFriendIDListReq) ProtoMessage() {}
+func (*AddUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{2}
+}
+func (m *AddUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Unmarshal(m, b)
+}
+func (m *AddUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
+}
+func (dst *AddUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Merge(dst, src)
+}
+func (m *AddUserRegisterAddFriendIDListReq) XXX_Size() int {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Size(m)
+}
+func (m *AddUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_AddUserRegisterAddFriendIDListReq.DiscardUnknown(m)
}
-var file_admin_cms_admin_cms_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_admin_cms_admin_cms_proto_goTypes = []interface{}{
- (*AdminLoginReq)(nil), // 0: admin_cms.AdminLoginReq
- (*AdminLoginResp)(nil), // 1: admin_cms.AdminLoginResp
-}
-var file_admin_cms_admin_cms_proto_depIdxs = []int32{
- 0, // 0: admin_cms.adminCMS.AdminLogin:input_type -> admin_cms.AdminLoginReq
- 1, // 1: admin_cms.adminCMS.AdminLogin:output_type -> admin_cms.AdminLoginResp
- 1, // [1:2] is the sub-list for method output_type
- 0, // [0:1] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
+var xxx_messageInfo_AddUserRegisterAddFriendIDListReq proto.InternalMessageInfo
-func init() { file_admin_cms_admin_cms_proto_init() }
-func file_admin_cms_admin_cms_proto_init() {
- if File_admin_cms_admin_cms_proto != nil {
- return
+func (m *AddUserRegisterAddFriendIDListReq) GetOperationID() string {
+ if m != nil {
+ return m.OperationID
}
- if !protoimpl.UnsafeEnabled {
- file_admin_cms_admin_cms_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AdminLoginReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_admin_cms_admin_cms_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AdminLoginResp); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
+ return ""
+}
+
+func (m *AddUserRegisterAddFriendIDListReq) GetUserIDList() []string {
+ if m != nil {
+ return m.UserIDList
}
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_admin_cms_admin_cms_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_admin_cms_admin_cms_proto_goTypes,
- DependencyIndexes: file_admin_cms_admin_cms_proto_depIdxs,
- MessageInfos: file_admin_cms_admin_cms_proto_msgTypes,
- }.Build()
- File_admin_cms_admin_cms_proto = out.File
- file_admin_cms_admin_cms_proto_rawDesc = nil
- file_admin_cms_admin_cms_proto_goTypes = nil
- file_admin_cms_admin_cms_proto_depIdxs = nil
+ return nil
+}
+
+type AddUserRegisterAddFriendIDListResp struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AddUserRegisterAddFriendIDListResp) Reset() { *m = AddUserRegisterAddFriendIDListResp{} }
+func (m *AddUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
+func (*AddUserRegisterAddFriendIDListResp) ProtoMessage() {}
+func (*AddUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{3}
+}
+func (m *AddUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Unmarshal(m, b)
+}
+func (m *AddUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
+}
+func (dst *AddUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Merge(dst, src)
+}
+func (m *AddUserRegisterAddFriendIDListResp) XXX_Size() int {
+ return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Size(m)
+}
+func (m *AddUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_AddUserRegisterAddFriendIDListResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AddUserRegisterAddFriendIDListResp proto.InternalMessageInfo
+
+type ReduceUserRegisterAddFriendIDListReq struct {
+ OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
+ Operation int32 `protobuf:"varint,2,opt,name=operation" json:"operation,omitempty"`
+ UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ReduceUserRegisterAddFriendIDListReq) Reset() { *m = ReduceUserRegisterAddFriendIDListReq{} }
+func (m *ReduceUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
+func (*ReduceUserRegisterAddFriendIDListReq) ProtoMessage() {}
+func (*ReduceUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{4}
+}
+func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Unmarshal(m, b)
+}
+func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
+}
+func (dst *ReduceUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Merge(dst, src)
+}
+func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Size() int {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Size(m)
+}
+func (m *ReduceUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq proto.InternalMessageInfo
+
+func (m *ReduceUserRegisterAddFriendIDListReq) GetOperationID() string {
+ if m != nil {
+ return m.OperationID
+ }
+ return ""
+}
+
+func (m *ReduceUserRegisterAddFriendIDListReq) GetOperation() int32 {
+ if m != nil {
+ return m.Operation
+ }
+ return 0
+}
+
+func (m *ReduceUserRegisterAddFriendIDListReq) GetUserIDList() []string {
+ if m != nil {
+ return m.UserIDList
+ }
+ return nil
+}
+
+type ReduceUserRegisterAddFriendIDListResp struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ReduceUserRegisterAddFriendIDListResp) Reset() { *m = ReduceUserRegisterAddFriendIDListResp{} }
+func (m *ReduceUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
+func (*ReduceUserRegisterAddFriendIDListResp) ProtoMessage() {}
+func (*ReduceUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{5}
+}
+func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Unmarshal(m, b)
+}
+func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
+}
+func (dst *ReduceUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Merge(dst, src)
+}
+func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Size() int {
+ return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Size(m)
+}
+func (m *ReduceUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp proto.InternalMessageInfo
+
+type GetUserRegisterAddFriendIDListReq struct {
+ OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
+ Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetUserRegisterAddFriendIDListReq) Reset() { *m = GetUserRegisterAddFriendIDListReq{} }
+func (m *GetUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
+func (*GetUserRegisterAddFriendIDListReq) ProtoMessage() {}
+func (*GetUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{6}
+}
+func (m *GetUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Unmarshal(m, b)
+}
+func (m *GetUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
+}
+func (dst *GetUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Merge(dst, src)
+}
+func (m *GetUserRegisterAddFriendIDListReq) XXX_Size() int {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Size(m)
+}
+func (m *GetUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetUserRegisterAddFriendIDListReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetUserRegisterAddFriendIDListReq proto.InternalMessageInfo
+
+func (m *GetUserRegisterAddFriendIDListReq) GetOperationID() string {
+ if m != nil {
+ return m.OperationID
+ }
+ return ""
+}
+
+func (m *GetUserRegisterAddFriendIDListReq) GetPagination() *sdk_ws.RequestPagination {
+ if m != nil {
+ return m.Pagination
+ }
+ return nil
+}
+
+type GetUserRegisterAddFriendIDListResp struct {
+ UserInfoList []*sdk_ws.UserInfo `protobuf:"bytes,1,rep,name=UserInfoList" json:"UserInfoList,omitempty"`
+ Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetUserRegisterAddFriendIDListResp) Reset() { *m = GetUserRegisterAddFriendIDListResp{} }
+func (m *GetUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
+func (*GetUserRegisterAddFriendIDListResp) ProtoMessage() {}
+func (*GetUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{7}
+}
+func (m *GetUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Unmarshal(m, b)
+}
+func (m *GetUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
+}
+func (dst *GetUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Merge(dst, src)
+}
+func (m *GetUserRegisterAddFriendIDListResp) XXX_Size() int {
+ return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Size(m)
+}
+func (m *GetUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetUserRegisterAddFriendIDListResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetUserRegisterAddFriendIDListResp proto.InternalMessageInfo
+
+func (m *GetUserRegisterAddFriendIDListResp) GetUserInfoList() []*sdk_ws.UserInfo {
+ if m != nil {
+ return m.UserInfoList
+ }
+ return nil
+}
+
+func (m *GetUserRegisterAddFriendIDListResp) GetPagination() *sdk_ws.ResponsePagination {
+ if m != nil {
+ return m.Pagination
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*AdminLoginReq)(nil), "admin_cms.AdminLoginReq")
+ proto.RegisterType((*AdminLoginResp)(nil), "admin_cms.AdminLoginResp")
+ proto.RegisterType((*AddUserRegisterAddFriendIDListReq)(nil), "admin_cms.AddUserRegisterAddFriendIDListReq")
+ proto.RegisterType((*AddUserRegisterAddFriendIDListResp)(nil), "admin_cms.AddUserRegisterAddFriendIDListResp")
+ proto.RegisterType((*ReduceUserRegisterAddFriendIDListReq)(nil), "admin_cms.ReduceUserRegisterAddFriendIDListReq")
+ proto.RegisterType((*ReduceUserRegisterAddFriendIDListResp)(nil), "admin_cms.ReduceUserRegisterAddFriendIDListResp")
+ proto.RegisterType((*GetUserRegisterAddFriendIDListReq)(nil), "admin_cms.GetUserRegisterAddFriendIDListReq")
+ proto.RegisterType((*GetUserRegisterAddFriendIDListResp)(nil), "admin_cms.GetUserRegisterAddFriendIDListResp")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
-var _ grpc.ClientConnInterface
+var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion6
+const _ = grpc.SupportPackageIsVersion4
+
+// Client API for AdminCMS service
-// AdminCMSClient is the client API for AdminCMS service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AdminCMSClient interface {
AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error)
+ AddUserRegisterAddFriendIDList(ctx context.Context, in *AddUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*AddUserRegisterAddFriendIDListResp, error)
+ ReduceUserRegisterAddFriendIDList(ctx context.Context, in *ReduceUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*ReduceUserRegisterAddFriendIDListResp, error)
+ GetUserRegisterAddFriendIDList(ctx context.Context, in *GetUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*GetUserRegisterAddFriendIDListResp, error)
}
type adminCMSClient struct {
- cc grpc.ClientConnInterface
+ cc *grpc.ClientConn
}
-func NewAdminCMSClient(cc grpc.ClientConnInterface) AdminCMSClient {
+func NewAdminCMSClient(cc *grpc.ClientConn) AdminCMSClient {
return &adminCMSClient{cc}
}
func (c *adminCMSClient) AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error) {
out := new(AdminLoginResp)
- err := c.cc.Invoke(ctx, "/admin_cms.adminCMS/AdminLogin", in, out, opts...)
+ err := grpc.Invoke(ctx, "/admin_cms.adminCMS/AdminLogin", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// AdminCMSServer is the server API for AdminCMS service.
+func (c *adminCMSClient) AddUserRegisterAddFriendIDList(ctx context.Context, in *AddUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*AddUserRegisterAddFriendIDListResp, error) {
+ out := new(AddUserRegisterAddFriendIDListResp)
+ err := grpc.Invoke(ctx, "/admin_cms.adminCMS/AddUserRegisterAddFriendIDList", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *adminCMSClient) ReduceUserRegisterAddFriendIDList(ctx context.Context, in *ReduceUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*ReduceUserRegisterAddFriendIDListResp, error) {
+ out := new(ReduceUserRegisterAddFriendIDListResp)
+ err := grpc.Invoke(ctx, "/admin_cms.adminCMS/ReduceUserRegisterAddFriendIDList", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *adminCMSClient) GetUserRegisterAddFriendIDList(ctx context.Context, in *GetUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*GetUserRegisterAddFriendIDListResp, error) {
+ out := new(GetUserRegisterAddFriendIDListResp)
+ err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserRegisterAddFriendIDList", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for AdminCMS service
+
type AdminCMSServer interface {
AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error)
-}
-
-// UnimplementedAdminCMSServer can be embedded to have forward compatible implementations.
-type UnimplementedAdminCMSServer struct {
-}
-
-func (*UnimplementedAdminCMSServer) AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method AdminLogin not implemented")
+ AddUserRegisterAddFriendIDList(context.Context, *AddUserRegisterAddFriendIDListReq) (*AddUserRegisterAddFriendIDListResp, error)
+ ReduceUserRegisterAddFriendIDList(context.Context, *ReduceUserRegisterAddFriendIDListReq) (*ReduceUserRegisterAddFriendIDListResp, error)
+ GetUserRegisterAddFriendIDList(context.Context, *GetUserRegisterAddFriendIDListReq) (*GetUserRegisterAddFriendIDListResp, error)
}
func RegisterAdminCMSServer(s *grpc.Server, srv AdminCMSServer) {
@@ -303,6 +471,60 @@ func _AdminCMS_AdminLogin_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
+func _AdminCMS_AddUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(AddUserRegisterAddFriendIDListReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(AdminCMSServer).AddUserRegisterAddFriendIDList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/admin_cms.adminCMS/AddUserRegisterAddFriendIDList",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(AdminCMSServer).AddUserRegisterAddFriendIDList(ctx, req.(*AddUserRegisterAddFriendIDListReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _AdminCMS_ReduceUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReduceUserRegisterAddFriendIDListReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(AdminCMSServer).ReduceUserRegisterAddFriendIDList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/admin_cms.adminCMS/ReduceUserRegisterAddFriendIDList",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(AdminCMSServer).ReduceUserRegisterAddFriendIDList(ctx, req.(*ReduceUserRegisterAddFriendIDListReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _AdminCMS_GetUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetUserRegisterAddFriendIDListReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(AdminCMSServer).GetUserRegisterAddFriendIDList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/admin_cms.adminCMS/GetUserRegisterAddFriendIDList",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(AdminCMSServer).GetUserRegisterAddFriendIDList(ctx, req.(*GetUserRegisterAddFriendIDListReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _AdminCMS_serviceDesc = grpc.ServiceDesc{
ServiceName: "admin_cms.adminCMS",
HandlerType: (*AdminCMSServer)(nil),
@@ -311,7 +533,56 @@ var _AdminCMS_serviceDesc = grpc.ServiceDesc{
MethodName: "AdminLogin",
Handler: _AdminCMS_AdminLogin_Handler,
},
+ {
+ MethodName: "AddUserRegisterAddFriendIDList",
+ Handler: _AdminCMS_AddUserRegisterAddFriendIDList_Handler,
+ },
+ {
+ MethodName: "ReduceUserRegisterAddFriendIDList",
+ Handler: _AdminCMS_ReduceUserRegisterAddFriendIDList_Handler,
+ },
+ {
+ MethodName: "GetUserRegisterAddFriendIDList",
+ Handler: _AdminCMS_GetUserRegisterAddFriendIDList_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "admin_cms/admin_cms.proto",
}
+
+func init() {
+ proto.RegisterFile("admin_cms/admin_cms.proto", fileDescriptor_admin_cms_e0cc6ee28c5c634b)
+}
+
+var fileDescriptor_admin_cms_e0cc6ee28c5c634b = []byte{
+ // 460 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0x6e, 0xd3, 0x40,
+ 0x10, 0xc7, 0xe5, 0x5a, 0x2d, 0x64, 0x02, 0x1c, 0x56, 0x7c, 0xb8, 0x01, 0x55, 0xc9, 0x2a, 0x85,
+ 0x1c, 0xc0, 0x46, 0xe1, 0xc8, 0x01, 0x05, 0x02, 0xc8, 0x52, 0xab, 0xa2, 0xad, 0xb8, 0x70, 0xb1,
+ 0x4c, 0x3c, 0x44, 0x56, 0x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bd, 0x89, 0xd7, 0x3b, 0xaf, 0x6f, 0x27, 0x58,
+ 0xce, 0xe1, 0x7a, 0x17, 0x54, 0xe6, 0xd0, 0x68, 0xdf, 0xca, 0x1c, 0x9a, 0xed, 0xf5, 0xfe, 0xc9,
+ 0xb7, 0x47, 0x61, 0xf1, 0x44, 0xbe, 0x5d, 0x7f, 0x7d, 0xdf, 0x71, 0xef, 0xdf, 0x9b, 0x7f, 0x01,
+ 0x00, 0x00, 0xff, 0xff, 0x99, 0xbe, 0x8e, 0x2a, 0x4a, 0x05, 0x00, 0x00,
+}
diff --git a/pkg/proto/admin_cms/admin_cms.proto b/pkg/proto/admin_cms/admin_cms.proto
index 6759268ed..acee32324 100644
--- a/pkg/proto/admin_cms/admin_cms.proto
+++ b/pkg/proto/admin_cms/admin_cms.proto
@@ -1,5 +1,6 @@
syntax = "proto3";
option go_package = "./admin_cms;admin_cms";
+import "Open_IM/pkg/proto/sdk_ws/ws.proto";
package admin_cms;
message AdminLoginReq {
@@ -13,6 +14,38 @@ message AdminLoginResp {
string token = 1;
}
+message AddUserRegisterAddFriendIDListReq {
+ string operationID = 1;
+ repeated string userIDList = 2;
+}
+
+message AddUserRegisterAddFriendIDListResp {
+
+}
+
+message ReduceUserRegisterAddFriendIDListReq {
+ string operationID = 1;
+ int32 operation = 2;
+ repeated string userIDList = 3;
+}
+
+message ReduceUserRegisterAddFriendIDListResp {
+
+}
+
+message GetUserRegisterAddFriendIDListReq {
+ string operationID = 1;
+ server_api_params.RequestPagination Pagination = 2;
+}
+
+message GetUserRegisterAddFriendIDListResp {
+ repeated server_api_params.UserInfo UserInfoList = 1;
+ server_api_params.ResponsePagination Pagination = 2;
+}
+
service adminCMS {
rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
+ rpc AddUserRegisterAddFriendIDList(AddUserRegisterAddFriendIDListReq) returns(AddUserRegisterAddFriendIDListResp);
+ rpc ReduceUserRegisterAddFriendIDList(ReduceUserRegisterAddFriendIDListReq) returns(ReduceUserRegisterAddFriendIDListResp);
+ rpc GetUserRegisterAddFriendIDList(GetUserRegisterAddFriendIDListReq) returns(GetUserRegisterAddFriendIDListResp);
}
\ No newline at end of file
diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go
index 09f54b1f9..7035233c0 100644
--- a/pkg/proto/auth/auth.pb.go
+++ b/pkg/proto/auth/auth.pb.go
@@ -1,395 +1,680 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.15.5
// source: auth/auth.proto
-package pbAuth // import "./auth"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import sdk_ws "Open_IM/pkg/proto/sdk_ws"
+package pbAuth
import (
- context "golang.org/x/net/context"
+ sdk_ws "Open_IM/pkg/proto/sdk_ws"
+ context "context"
grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
)
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
type CommonResp struct {
- ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
- ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ErrCode int32 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode,omitempty"`
+ ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
}
-func (m *CommonResp) Reset() { *m = CommonResp{} }
-func (m *CommonResp) String() string { return proto.CompactTextString(m) }
-func (*CommonResp) ProtoMessage() {}
+func (x *CommonResp) Reset() {
+ *x = CommonResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CommonResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonResp) ProtoMessage() {}
+
+func (x *CommonResp) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonResp.ProtoReflect.Descriptor instead.
func (*CommonResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{0}
-}
-func (m *CommonResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CommonResp.Unmarshal(m, b)
-}
-func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
-}
-func (dst *CommonResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CommonResp.Merge(dst, src)
-}
-func (m *CommonResp) XXX_Size() int {
- return xxx_messageInfo_CommonResp.Size(m)
-}
-func (m *CommonResp) XXX_DiscardUnknown() {
- xxx_messageInfo_CommonResp.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{0}
}
-var xxx_messageInfo_CommonResp proto.InternalMessageInfo
-
-func (m *CommonResp) GetErrCode() int32 {
- if m != nil {
- return m.ErrCode
+func (x *CommonResp) GetErrCode() int32 {
+ if x != nil {
+ return x.ErrCode
}
return 0
}
-func (m *CommonResp) GetErrMsg() string {
- if m != nil {
- return m.ErrMsg
+func (x *CommonResp) GetErrMsg() string {
+ if x != nil {
+ return x.ErrMsg
}
return ""
}
type UserRegisterReq struct {
- UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"`
- OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo,proto3" json:"UserInfo,omitempty"`
+ OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
-func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} }
-func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) }
-func (*UserRegisterReq) ProtoMessage() {}
+func (x *UserRegisterReq) Reset() {
+ *x = UserRegisterReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserRegisterReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRegisterReq) ProtoMessage() {}
+
+func (x *UserRegisterReq) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead.
func (*UserRegisterReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{1}
-}
-func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b)
-}
-func (m *UserRegisterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserRegisterReq.Marshal(b, m, deterministic)
-}
-func (dst *UserRegisterReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserRegisterReq.Merge(dst, src)
-}
-func (m *UserRegisterReq) XXX_Size() int {
- return xxx_messageInfo_UserRegisterReq.Size(m)
-}
-func (m *UserRegisterReq) XXX_DiscardUnknown() {
- xxx_messageInfo_UserRegisterReq.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{1}
}
-var xxx_messageInfo_UserRegisterReq proto.InternalMessageInfo
-
-func (m *UserRegisterReq) GetUserInfo() *sdk_ws.UserInfo {
- if m != nil {
- return m.UserInfo
+func (x *UserRegisterReq) GetUserInfo() *sdk_ws.UserInfo {
+ if x != nil {
+ return x.UserInfo
}
return nil
}
-func (m *UserRegisterReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
+func (x *UserRegisterReq) GetOperationID() string {
+ if x != nil {
+ return x.OperationID
}
return ""
}
type UserRegisterResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"`
}
-func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} }
-func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) }
-func (*UserRegisterResp) ProtoMessage() {}
+func (x *UserRegisterResp) Reset() {
+ *x = UserRegisterResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserRegisterResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRegisterResp) ProtoMessage() {}
+
+func (x *UserRegisterResp) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserRegisterResp.ProtoReflect.Descriptor instead.
func (*UserRegisterResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{2}
-}
-func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b)
-}
-func (m *UserRegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserRegisterResp.Marshal(b, m, deterministic)
-}
-func (dst *UserRegisterResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserRegisterResp.Merge(dst, src)
-}
-func (m *UserRegisterResp) XXX_Size() int {
- return xxx_messageInfo_UserRegisterResp.Size(m)
-}
-func (m *UserRegisterResp) XXX_DiscardUnknown() {
- xxx_messageInfo_UserRegisterResp.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{2}
}
-var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo
-
-func (m *UserRegisterResp) GetCommonResp() *CommonResp {
- if m != nil {
- return m.CommonResp
+func (x *UserRegisterResp) GetCommonResp() *CommonResp {
+ if x != nil {
+ return x.CommonResp
}
return nil
}
type UserTokenReq struct {
- Platform int32 `protobuf:"varint,1,opt,name=Platform" json:"Platform,omitempty"`
- FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"`
- OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Platform int32 `protobuf:"varint,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
+ FromUserID string `protobuf:"bytes,2,opt,name=FromUserID,proto3" json:"FromUserID,omitempty"`
+ OpUserID string `protobuf:"bytes,3,opt,name=OpUserID,proto3" json:"OpUserID,omitempty"`
+ OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
+ LoginIp string `protobuf:"bytes,5,opt,name=LoginIp,proto3" json:"LoginIp,omitempty"`
}
-func (m *UserTokenReq) Reset() { *m = UserTokenReq{} }
-func (m *UserTokenReq) String() string { return proto.CompactTextString(m) }
-func (*UserTokenReq) ProtoMessage() {}
+func (x *UserTokenReq) Reset() {
+ *x = UserTokenReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserTokenReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserTokenReq) ProtoMessage() {}
+
+func (x *UserTokenReq) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserTokenReq.ProtoReflect.Descriptor instead.
func (*UserTokenReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{3}
-}
-func (m *UserTokenReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserTokenReq.Unmarshal(m, b)
-}
-func (m *UserTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserTokenReq.Marshal(b, m, deterministic)
-}
-func (dst *UserTokenReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserTokenReq.Merge(dst, src)
-}
-func (m *UserTokenReq) XXX_Size() int {
- return xxx_messageInfo_UserTokenReq.Size(m)
-}
-func (m *UserTokenReq) XXX_DiscardUnknown() {
- xxx_messageInfo_UserTokenReq.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{3}
}
-var xxx_messageInfo_UserTokenReq proto.InternalMessageInfo
-
-func (m *UserTokenReq) GetPlatform() int32 {
- if m != nil {
- return m.Platform
+func (x *UserTokenReq) GetPlatform() int32 {
+ if x != nil {
+ return x.Platform
}
return 0
}
-func (m *UserTokenReq) GetFromUserID() string {
- if m != nil {
- return m.FromUserID
+func (x *UserTokenReq) GetFromUserID() string {
+ if x != nil {
+ return x.FromUserID
}
return ""
}
-func (m *UserTokenReq) GetOpUserID() string {
- if m != nil {
- return m.OpUserID
+func (x *UserTokenReq) GetOpUserID() string {
+ if x != nil {
+ return x.OpUserID
}
return ""
}
-func (m *UserTokenReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
+func (x *UserTokenReq) GetOperationID() string {
+ if x != nil {
+ return x.OperationID
+ }
+ return ""
+}
+
+func (x *UserTokenReq) GetLoginIp() string {
+ if x != nil {
+ return x.LoginIp
}
return ""
}
type UserTokenResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
- Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"`
- ExpiredTime int64 `protobuf:"varint,3,opt,name=ExpiredTime" json:"ExpiredTime,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"`
+ Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"`
+ ExpiredTime int64 `protobuf:"varint,3,opt,name=ExpiredTime,proto3" json:"ExpiredTime,omitempty"`
}
-func (m *UserTokenResp) Reset() { *m = UserTokenResp{} }
-func (m *UserTokenResp) String() string { return proto.CompactTextString(m) }
-func (*UserTokenResp) ProtoMessage() {}
+func (x *UserTokenResp) Reset() {
+ *x = UserTokenResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserTokenResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserTokenResp) ProtoMessage() {}
+
+func (x *UserTokenResp) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserTokenResp.ProtoReflect.Descriptor instead.
func (*UserTokenResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{4}
-}
-func (m *UserTokenResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserTokenResp.Unmarshal(m, b)
-}
-func (m *UserTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserTokenResp.Marshal(b, m, deterministic)
-}
-func (dst *UserTokenResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserTokenResp.Merge(dst, src)
-}
-func (m *UserTokenResp) XXX_Size() int {
- return xxx_messageInfo_UserTokenResp.Size(m)
-}
-func (m *UserTokenResp) XXX_DiscardUnknown() {
- xxx_messageInfo_UserTokenResp.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{4}
}
-var xxx_messageInfo_UserTokenResp proto.InternalMessageInfo
-
-func (m *UserTokenResp) GetCommonResp() *CommonResp {
- if m != nil {
- return m.CommonResp
+func (x *UserTokenResp) GetCommonResp() *CommonResp {
+ if x != nil {
+ return x.CommonResp
}
return nil
}
-func (m *UserTokenResp) GetToken() string {
- if m != nil {
- return m.Token
+func (x *UserTokenResp) GetToken() string {
+ if x != nil {
+ return x.Token
}
return ""
}
-func (m *UserTokenResp) GetExpiredTime() int64 {
- if m != nil {
- return m.ExpiredTime
+func (x *UserTokenResp) GetExpiredTime() int64 {
+ if x != nil {
+ return x.ExpiredTime
}
return 0
}
type ForceLogoutReq struct {
- Platform int32 `protobuf:"varint,1,opt,name=Platform" json:"Platform,omitempty"`
- FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"`
- OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Platform int32 `protobuf:"varint,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
+ FromUserID string `protobuf:"bytes,2,opt,name=FromUserID,proto3" json:"FromUserID,omitempty"`
+ OpUserID string `protobuf:"bytes,3,opt,name=OpUserID,proto3" json:"OpUserID,omitempty"`
+ OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
-func (m *ForceLogoutReq) Reset() { *m = ForceLogoutReq{} }
-func (m *ForceLogoutReq) String() string { return proto.CompactTextString(m) }
-func (*ForceLogoutReq) ProtoMessage() {}
+func (x *ForceLogoutReq) Reset() {
+ *x = ForceLogoutReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ForceLogoutReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForceLogoutReq) ProtoMessage() {}
+
+func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ForceLogoutReq.ProtoReflect.Descriptor instead.
func (*ForceLogoutReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{5}
-}
-func (m *ForceLogoutReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ForceLogoutReq.Unmarshal(m, b)
-}
-func (m *ForceLogoutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ForceLogoutReq.Marshal(b, m, deterministic)
-}
-func (dst *ForceLogoutReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ForceLogoutReq.Merge(dst, src)
-}
-func (m *ForceLogoutReq) XXX_Size() int {
- return xxx_messageInfo_ForceLogoutReq.Size(m)
-}
-func (m *ForceLogoutReq) XXX_DiscardUnknown() {
- xxx_messageInfo_ForceLogoutReq.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{5}
}
-var xxx_messageInfo_ForceLogoutReq proto.InternalMessageInfo
-
-func (m *ForceLogoutReq) GetPlatform() int32 {
- if m != nil {
- return m.Platform
+func (x *ForceLogoutReq) GetPlatform() int32 {
+ if x != nil {
+ return x.Platform
}
return 0
}
-func (m *ForceLogoutReq) GetFromUserID() string {
- if m != nil {
- return m.FromUserID
+func (x *ForceLogoutReq) GetFromUserID() string {
+ if x != nil {
+ return x.FromUserID
}
return ""
}
-func (m *ForceLogoutReq) GetOpUserID() string {
- if m != nil {
- return m.OpUserID
+func (x *ForceLogoutReq) GetOpUserID() string {
+ if x != nil {
+ return x.OpUserID
}
return ""
}
-func (m *ForceLogoutReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
+func (x *ForceLogoutReq) GetOperationID() string {
+ if x != nil {
+ return x.OperationID
}
return ""
}
type ForceLogoutResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"`
}
-func (m *ForceLogoutResp) Reset() { *m = ForceLogoutResp{} }
-func (m *ForceLogoutResp) String() string { return proto.CompactTextString(m) }
-func (*ForceLogoutResp) ProtoMessage() {}
+func (x *ForceLogoutResp) Reset() {
+ *x = ForceLogoutResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_auth_auth_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ForceLogoutResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForceLogoutResp) ProtoMessage() {}
+
+func (x *ForceLogoutResp) ProtoReflect() protoreflect.Message {
+ mi := &file_auth_auth_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ForceLogoutResp.ProtoReflect.Descriptor instead.
func (*ForceLogoutResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_auth_68293efd650e0000, []int{6}
-}
-func (m *ForceLogoutResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ForceLogoutResp.Unmarshal(m, b)
-}
-func (m *ForceLogoutResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ForceLogoutResp.Marshal(b, m, deterministic)
-}
-func (dst *ForceLogoutResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ForceLogoutResp.Merge(dst, src)
-}
-func (m *ForceLogoutResp) XXX_Size() int {
- return xxx_messageInfo_ForceLogoutResp.Size(m)
-}
-func (m *ForceLogoutResp) XXX_DiscardUnknown() {
- xxx_messageInfo_ForceLogoutResp.DiscardUnknown(m)
+ return file_auth_auth_proto_rawDescGZIP(), []int{6}
}
-var xxx_messageInfo_ForceLogoutResp proto.InternalMessageInfo
-
-func (m *ForceLogoutResp) GetCommonResp() *CommonResp {
- if m != nil {
- return m.CommonResp
+func (x *ForceLogoutResp) GetCommonResp() *CommonResp {
+ if x != nil {
+ return x.CommonResp
}
return nil
}
-func init() {
- proto.RegisterType((*CommonResp)(nil), "pbAuth.CommonResp")
- proto.RegisterType((*UserRegisterReq)(nil), "pbAuth.UserRegisterReq")
- proto.RegisterType((*UserRegisterResp)(nil), "pbAuth.UserRegisterResp")
- proto.RegisterType((*UserTokenReq)(nil), "pbAuth.UserTokenReq")
- proto.RegisterType((*UserTokenResp)(nil), "pbAuth.UserTokenResp")
- proto.RegisterType((*ForceLogoutReq)(nil), "pbAuth.ForceLogoutReq")
- proto.RegisterType((*ForceLogoutResp)(nil), "pbAuth.ForceLogoutResp")
+var File_auth_auth_proto protoreflect.FileDescriptor
+
+var file_auth_auth_proto_rawDesc = []byte{
+ 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x06, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x1a, 0x21, 0x4f, 0x70, 0x65, 0x6e, 0x5f,
+ 0x49, 0x4d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b,
+ 0x5f, 0x77, 0x73, 0x2f, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72,
+ 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72,
+ 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x6c, 0x0a, 0x0f,
+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12,
+ 0x37, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08,
+ 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73,
+ 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32,
+ 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12,
+ 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a,
+ 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49, 0x70, 0x22, 0x7b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70,
+ 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
+ 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x54, 0x69, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64,
+ 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f,
+ 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
+ 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
+ 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49,
+ 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65,
+ 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12,
+ 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+ 0x44, 0x22, 0x45, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74,
+ 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x32, 0xc3, 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74,
+ 0x68, 0x12, 0x41, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
+ 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x41,
+ 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68,
+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e,
+ 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e,
+ 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f,
+ 0x75, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x46,
+ 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0f,
+ 0x5a, 0x0d, 0x2e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x3b, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_auth_auth_proto_rawDescOnce sync.Once
+ file_auth_auth_proto_rawDescData = file_auth_auth_proto_rawDesc
+)
+
+func file_auth_auth_proto_rawDescGZIP() []byte {
+ file_auth_auth_proto_rawDescOnce.Do(func() {
+ file_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_auth_proto_rawDescData)
+ })
+ return file_auth_auth_proto_rawDescData
+}
+
+var file_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_auth_auth_proto_goTypes = []interface{}{
+ (*CommonResp)(nil), // 0: pbAuth.CommonResp
+ (*UserRegisterReq)(nil), // 1: pbAuth.UserRegisterReq
+ (*UserRegisterResp)(nil), // 2: pbAuth.UserRegisterResp
+ (*UserTokenReq)(nil), // 3: pbAuth.UserTokenReq
+ (*UserTokenResp)(nil), // 4: pbAuth.UserTokenResp
+ (*ForceLogoutReq)(nil), // 5: pbAuth.ForceLogoutReq
+ (*ForceLogoutResp)(nil), // 6: pbAuth.ForceLogoutResp
+ (*sdk_ws.UserInfo)(nil), // 7: server_api_params.UserInfo
+}
+var file_auth_auth_proto_depIdxs = []int32{
+ 7, // 0: pbAuth.UserRegisterReq.UserInfo:type_name -> server_api_params.UserInfo
+ 0, // 1: pbAuth.UserRegisterResp.CommonResp:type_name -> pbAuth.CommonResp
+ 0, // 2: pbAuth.UserTokenResp.CommonResp:type_name -> pbAuth.CommonResp
+ 0, // 3: pbAuth.ForceLogoutResp.CommonResp:type_name -> pbAuth.CommonResp
+ 1, // 4: pbAuth.Auth.UserRegister:input_type -> pbAuth.UserRegisterReq
+ 3, // 5: pbAuth.Auth.UserToken:input_type -> pbAuth.UserTokenReq
+ 5, // 6: pbAuth.Auth.ForceLogout:input_type -> pbAuth.ForceLogoutReq
+ 2, // 7: pbAuth.Auth.UserRegister:output_type -> pbAuth.UserRegisterResp
+ 4, // 8: pbAuth.Auth.UserToken:output_type -> pbAuth.UserTokenResp
+ 6, // 9: pbAuth.Auth.ForceLogout:output_type -> pbAuth.ForceLogoutResp
+ 7, // [7:10] is the sub-list for method output_type
+ 4, // [4:7] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_auth_auth_proto_init() }
+func file_auth_auth_proto_init() {
+ if File_auth_auth_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_auth_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CommonResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserRegisterReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserRegisterResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserTokenReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserTokenResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ForceLogoutReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_auth_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ForceLogoutResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_auth_auth_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_auth_auth_proto_goTypes,
+ DependencyIndexes: file_auth_auth_proto_depIdxs,
+ MessageInfos: file_auth_auth_proto_msgTypes,
+ }.Build()
+ File_auth_auth_proto = out.File
+ file_auth_auth_proto_rawDesc = nil
+ file_auth_auth_proto_goTypes = nil
+ file_auth_auth_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
-var _ grpc.ClientConn
+var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
-
-// Client API for Auth service
+const _ = grpc.SupportPackageIsVersion6
+// AuthClient is the client API for Auth service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AuthClient interface {
UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error)
UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error)
@@ -397,16 +682,16 @@ type AuthClient interface {
}
type authClient struct {
- cc *grpc.ClientConn
+ cc grpc.ClientConnInterface
}
-func NewAuthClient(cc *grpc.ClientConn) AuthClient {
+func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
return &authClient{cc}
}
func (c *authClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) {
out := new(UserRegisterResp)
- err := grpc.Invoke(ctx, "/pbAuth.Auth/UserRegister", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserRegister", in, out, opts...)
if err != nil {
return nil, err
}
@@ -415,7 +700,7 @@ func (c *authClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts
func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) {
out := new(UserTokenResp)
- err := grpc.Invoke(ctx, "/pbAuth.Auth/UserToken", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserToken", in, out, opts...)
if err != nil {
return nil, err
}
@@ -424,21 +709,34 @@ func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...gr
func (c *authClient) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) {
out := new(ForceLogoutResp)
- err := grpc.Invoke(ctx, "/pbAuth.Auth/ForceLogout", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/pbAuth.Auth/ForceLogout", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Auth service
-
+// AuthServer is the server API for Auth service.
type AuthServer interface {
UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error)
ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error)
}
+// UnimplementedAuthServer can be embedded to have forward compatible implementations.
+type UnimplementedAuthServer struct {
+}
+
+func (*UnimplementedAuthServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented")
+}
+func (*UnimplementedAuthServer) UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UserToken not implemented")
+}
+func (*UnimplementedAuthServer) ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ForceLogout not implemented")
+}
+
func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
s.RegisterService(&_Auth_serviceDesc, srv)
}
@@ -517,36 +815,3 @@ var _Auth_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{},
Metadata: "auth/auth.proto",
}
-
-func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_68293efd650e0000) }
-
-var fileDescriptor_auth_68293efd650e0000 = []byte{
- // 417 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0x5d, 0x8b, 0xda, 0x40,
- 0x14, 0x25, 0xf5, 0xa3, 0x7a, 0xad, 0x4d, 0x19, 0xac, 0x86, 0x14, 0x8a, 0xcd, 0x93, 0x4f, 0x09,
- 0xd8, 0x87, 0x16, 0x0a, 0x82, 0xb5, 0x0a, 0x42, 0xc5, 0x12, 0xec, 0xcb, 0xbe, 0x84, 0xb8, 0x8e,
- 0x31, 0x68, 0x32, 0xb3, 0x33, 0x71, 0x5d, 0xd8, 0x3f, 0xb0, 0xec, 0xdf, 0xda, 0x3f, 0xb6, 0xcc,
- 0xe4, 0x63, 0x47, 0xd7, 0x27, 0x5f, 0xf6, 0x25, 0xe1, 0x9e, 0x73, 0x66, 0xee, 0x39, 0x77, 0x66,
- 0x40, 0xf7, 0xf7, 0xc9, 0xc6, 0x11, 0x1f, 0x9b, 0x32, 0x92, 0x10, 0x54, 0xa5, 0xcb, 0xe1, 0x3e,
- 0xd9, 0x98, 0xdf, 0xe6, 0x14, 0xc7, 0xde, 0x74, 0xe6, 0xd0, 0x6d, 0xe0, 0x48, 0xca, 0xe1, 0xab,
- 0xad, 0x77, 0xe0, 0xce, 0x81, 0xa7, 0x52, 0x6b, 0x00, 0x30, 0x22, 0x51, 0x44, 0x62, 0x17, 0x73,
- 0x8a, 0x0c, 0x78, 0x8f, 0x19, 0x1b, 0x91, 0x15, 0x36, 0xb4, 0xae, 0xd6, 0xab, 0xb8, 0x79, 0x89,
- 0xda, 0x50, 0xc5, 0x8c, 0xcd, 0x78, 0x60, 0xbc, 0xeb, 0x6a, 0xbd, 0xba, 0x9b, 0x55, 0xd6, 0x0e,
- 0xf4, 0xff, 0x1c, 0x33, 0x17, 0x07, 0x21, 0x4f, 0xc4, 0xff, 0x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, 0x2e,
- 0xac, 0x69, 0x9c, 0x27, 0x38, 0x45, 0x3f, 0xa1, 0x5e, 0x1c, 0x0e, 0x6a, 0xa9, 0xb2, 0xfc, 0xe6,
- 0x98, 0x9f, 0xcf, 0xa0, 0x9c, 0xa2, 0x01, 0x34, 0x94, 0x30, 0xa8, 0x9d, 0xab, 0x8e, 0xa7, 0x6d,
- 0x76, 0xce, 0xe2, 0x9c, 0xfe, 0xd6, 0xaf, 0x9a, 0xb6, 0x7c, 0xd2, 0xbf, 0x52, 0xc1, 0xb2, 0x2a,
- 0xdf, 0xeb, 0xf7, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0x61, 0xac, 0x2b, 0xed, 0x03, 0x00,
- 0x00,
-}
diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto
index 53a14d760..675aa1a02 100644
--- a/pkg/proto/auth/auth.proto
+++ b/pkg/proto/auth/auth.proto
@@ -22,6 +22,7 @@ message UserTokenReq {
string FromUserID = 2;
string OpUserID = 3;
string OperationID = 4;
+ string LoginIp = 5;
}
message UserTokenResp {
CommonResp CommonResp = 1;
diff --git a/pkg/proto/conversation/conversation.pb.go b/pkg/proto/conversation/conversation.pb.go
index bf76bfe67..de4d4a793 100644
--- a/pkg/proto/conversation/conversation.pb.go
+++ b/pkg/proto/conversation/conversation.pb.go
@@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_conversation_e6bf38f800b9bed2, []int{0}
+ return fileDescriptor_conversation_ac55165355a1b6e6, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
@@ -70,30 +70,31 @@ func (m *CommonResp) GetErrMsg() string {
}
type Conversation struct {
- OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
- ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
- RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
- ConversationType int32 `protobuf:"varint,4,opt,name=conversationType" json:"conversationType,omitempty"`
- UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
- GroupID string `protobuf:"bytes,6,opt,name=groupID" json:"groupID,omitempty"`
- UnreadCount int32 `protobuf:"varint,7,opt,name=unreadCount" json:"unreadCount,omitempty"`
- DraftTextTime int64 `protobuf:"varint,8,opt,name=draftTextTime" json:"draftTextTime,omitempty"`
- IsPinned bool `protobuf:"varint,9,opt,name=isPinned" json:"isPinned,omitempty"`
- AttachedInfo string `protobuf:"bytes,10,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
- IsPrivateChat bool `protobuf:"varint,11,opt,name=isPrivateChat" json:"isPrivateChat,omitempty"`
- GroupAtType int32 `protobuf:"varint,12,opt,name=groupAtType" json:"groupAtType,omitempty"`
- IsNotInGroup bool `protobuf:"varint,13,opt,name=isNotInGroup" json:"isNotInGroup,omitempty"`
- Ex string `protobuf:"bytes,14,opt,name=ex" json:"ex,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
+ ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
+ RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
+ ConversationType int32 `protobuf:"varint,4,opt,name=conversationType" json:"conversationType,omitempty"`
+ UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
+ GroupID string `protobuf:"bytes,6,opt,name=groupID" json:"groupID,omitempty"`
+ UnreadCount int32 `protobuf:"varint,7,opt,name=unreadCount" json:"unreadCount,omitempty"`
+ DraftTextTime int64 `protobuf:"varint,8,opt,name=draftTextTime" json:"draftTextTime,omitempty"`
+ IsPinned bool `protobuf:"varint,9,opt,name=isPinned" json:"isPinned,omitempty"`
+ AttachedInfo string `protobuf:"bytes,10,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
+ IsPrivateChat bool `protobuf:"varint,11,opt,name=isPrivateChat" json:"isPrivateChat,omitempty"`
+ GroupAtType int32 `protobuf:"varint,12,opt,name=groupAtType" json:"groupAtType,omitempty"`
+ IsNotInGroup bool `protobuf:"varint,13,opt,name=isNotInGroup" json:"isNotInGroup,omitempty"`
+ Ex string `protobuf:"bytes,14,opt,name=ex" json:"ex,omitempty"`
+ UpdateUnreadCountTime int64 `protobuf:"varint,15,opt,name=updateUnreadCountTime" json:"updateUnreadCountTime,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Conversation) Reset() { *m = Conversation{} }
func (m *Conversation) String() string { return proto.CompactTextString(m) }
func (*Conversation) ProtoMessage() {}
func (*Conversation) Descriptor() ([]byte, []int) {
- return fileDescriptor_conversation_e6bf38f800b9bed2, []int{1}
+ return fileDescriptor_conversation_ac55165355a1b6e6, []int{1}
}
func (m *Conversation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Conversation.Unmarshal(m, b)
@@ -211,6 +212,13 @@ func (m *Conversation) GetEx() string {
return ""
}
+func (m *Conversation) GetUpdateUnreadCountTime() int64 {
+ if m != nil {
+ return m.UpdateUnreadCountTime
+ }
+ return 0
+}
+
type ModifyConversationFieldReq struct {
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
@@ -225,7 +233,7 @@ func (m *ModifyConversationFieldReq) Reset() { *m = ModifyConversationFi
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldReq) ProtoMessage() {}
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_conversation_e6bf38f800b9bed2, []int{2}
+ return fileDescriptor_conversation_ac55165355a1b6e6, []int{2}
}
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
@@ -284,7 +292,7 @@ func (m *ModifyConversationFieldResp) Reset() { *m = ModifyConversationF
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldResp) ProtoMessage() {}
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_conversation_e6bf38f800b9bed2, []int{3}
+ return fileDescriptor_conversation_ac55165355a1b6e6, []int{3}
}
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
@@ -391,39 +399,40 @@ var _Conversation_serviceDesc = grpc.ServiceDesc{
}
func init() {
- proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_e6bf38f800b9bed2)
+ proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_ac55165355a1b6e6)
}
-var fileDescriptor_conversation_e6bf38f800b9bed2 = []byte{
- // 475 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x8a, 0xd3, 0x40,
- 0x14, 0x87, 0x49, 0xbb, 0xdb, 0x6d, 0x4e, 0xbb, 0x45, 0xe6, 0x42, 0x87, 0xae, 0x7f, 0x42, 0x10,
- 0x89, 0x5e, 0x54, 0x58, 0x6f, 0x04, 0x61, 0x41, 0x53, 0x94, 0x80, 0xd5, 0x65, 0xa8, 0x08, 0xde,
- 0xc5, 0xe6, 0xb4, 0x3b, 0x60, 0x67, 0xe2, 0xcc, 0xb4, 0x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0x9e, 0x33, 0xaf, 0xf7, 0xfc, 0x77, 0x78, 0x71, 0x22, 0xe0, 0xc1, 0x81,
- 0x83, 0x48, 0x16, 0x06, 0x1e, 0xfe, 0x9a, 0xc3, 0xe7, 0x77, 0xec, 0xd4, 0xf5, 0xbb, 0x47, 0xdf,
- 0xce, 0x46, 0xc1, 0xaf, 0xfd, 0xc6, 0x2f, 0xbe, 0x77, 0xdc, 0x8f, 0xfe, 0xea, 0x5f, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0x8d, 0x8a, 0xf6, 0x60, 0x0b, 0x04, 0x00, 0x00,
+var fileDescriptor_conversation_ac55165355a1b6e6 = []byte{
+ // 494 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x8b, 0x13, 0x31,
+ 0x14, 0xc5, 0x99, 0x6e, 0xb7, 0xdb, 0xde, 0x76, 0xab, 0x04, 0xd4, 0xd0, 0xf5, 0x4f, 0x19, 0x44,
+ 0x46, 0x1f, 0x2a, 0xac, 0x3e, 0x08, 0xc2, 0x82, 0x4e, 0x51, 0x06, 0xac, 0x2e, 0xa1, 0x8b, 0xe0,
+ 0xdb, 0xd8, 0xb9, 0xed, 0x06, 0x6c, 0x32, 0x26, 0x99, 0xda, 0x7d, 0xf1, 0x33, 0xf8, 0x81, 0xfc,
+ 0x70, 0x92, 0x4c, 0xbb, 0x4d, 0x56, 0x0b, 0x3e, 0xde, 0x5f, 0xee, 0x9c, 0x9c, 0x33, 0x3d, 0x1d,
+ 0x78, 0x34, 0x93, 0x62, 0x85, 0x4a, 0xe7, 0x86, 0x4b, 0xf1, 0xdc, 0x1f, 0x46, 0xa5, 0x92, 0x46,
+ 0x92, 0x9e, 0xcf, 0xe2, 0x33, 0x80, 0x54, 0x2e, 0x97, 0x52, 0x30, 0xd4, 0x25, 0xa1, 0x70, 0x84,
+ 0x4a, 0xa5, 0xb2, 0x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, 0x20, 0xbc, 0xf6, 0x87, 0xaf, 0x2d, 0xf7, 0x79, 0x78,
+ 0xf1, 0x27, 0x00, 0x00, 0xff, 0xff, 0x12, 0x56, 0xaa, 0x7b, 0x41, 0x04, 0x00, 0x00,
}
diff --git a/pkg/proto/conversation/conversation.proto b/pkg/proto/conversation/conversation.proto
index 5ae5f1142..48973fdc1 100644
--- a/pkg/proto/conversation/conversation.proto
+++ b/pkg/proto/conversation/conversation.proto
@@ -21,6 +21,8 @@ message Conversation{
int32 groupAtType = 12;
bool isNotInGroup = 13;
string ex = 14;
+ int64 updateUnreadCountTime = 15;
+
}
message ModifyConversationFieldReq{
Conversation conversation = 1;
diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go
index 349827f6d..d4cd55960 100644
--- a/pkg/proto/group/group.pb.go
+++ b/pkg/proto/group/group.pb.go
@@ -37,7 +37,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{0}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
@@ -83,7 +83,7 @@ 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_d529c7a0e85dbd90, []int{1}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{1}
}
func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b)
@@ -132,7 +132,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
func (*CreateGroupReq) ProtoMessage() {}
func (*CreateGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{2}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{2}
}
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
@@ -200,7 +200,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
func (*CreateGroupResp) ProtoMessage() {}
func (*CreateGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{3}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{3}
}
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
@@ -254,7 +254,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoReq) ProtoMessage() {}
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{4}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{4}
}
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
@@ -308,7 +308,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoResp) ProtoMessage() {}
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{5}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{5}
}
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
@@ -362,7 +362,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoReq) ProtoMessage() {}
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{6}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{6}
}
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
@@ -414,7 +414,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} }
func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoResp) ProtoMessage() {}
func (*SetGroupInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{7}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{7}
}
func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b)
@@ -454,7 +454,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListReq) ProtoMessage() {}
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{8}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{8}
}
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
@@ -508,7 +508,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListResp) ProtoMessage() {}
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{9}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{9}
}
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
@@ -562,7 +562,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat
func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListReq) ProtoMessage() {}
func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{10}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{10}
}
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
@@ -615,7 +615,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica
func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListResp) ProtoMessage() {}
func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{11}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{11}
}
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
@@ -664,7 +664,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerReq) ProtoMessage() {}
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{12}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{12}
}
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
@@ -730,7 +730,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerResp) ProtoMessage() {}
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{13}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{13}
}
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
@@ -773,7 +773,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
func (*JoinGroupReq) ProtoMessage() {}
func (*JoinGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{14}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{14}
}
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
@@ -846,7 +846,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} }
func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) }
func (*JoinGroupResp) ProtoMessage() {}
func (*JoinGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{15}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{15}
}
func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b)
@@ -889,7 +889,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseReq) ProtoMessage() {}
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{16}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{16}
}
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
@@ -962,7 +962,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseResp) ProtoMessage() {}
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{17}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{17}
}
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
@@ -1002,7 +1002,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
func (*QuitGroupReq) ProtoMessage() {}
func (*QuitGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{18}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{18}
}
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
@@ -1054,7 +1054,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} }
func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) }
func (*QuitGroupResp) ProtoMessage() {}
func (*QuitGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{19}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{19}
}
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
@@ -1096,7 +1096,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListReq) ProtoMessage() {}
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{20}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{20}
}
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
@@ -1165,7 +1165,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListResp) ProtoMessage() {}
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{21}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{21}
}
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
@@ -1227,7 +1227,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoReq) ProtoMessage() {}
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{22}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{22}
}
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
@@ -1288,7 +1288,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoResp) ProtoMessage() {}
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{23}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{23}
}
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
@@ -1344,7 +1344,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberReq) ProtoMessage() {}
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{24}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{24}
}
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
@@ -1411,7 +1411,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} }
func (m *Id2Result) String() string { return proto.CompactTextString(m) }
func (*Id2Result) ProtoMessage() {}
func (*Id2Result) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{25}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{25}
}
func (m *Id2Result) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Id2Result.Unmarshal(m, b)
@@ -1458,7 +1458,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberResp) ProtoMessage() {}
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{26}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{26}
}
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
@@ -1512,7 +1512,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListReq) ProtoMessage() {}
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{27}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{27}
}
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
@@ -1566,7 +1566,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListResp) ProtoMessage() {}
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{28}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{28}
}
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
@@ -1622,7 +1622,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupReq) ProtoMessage() {}
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{29}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{29}
}
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
@@ -1690,7 +1690,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupResp) ProtoMessage() {}
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{30}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{30}
}
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
@@ -1735,6 +1735,8 @@ type GetGroupAllMemberReq struct {
GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
+ Offset int32 `protobuf:"varint,4,opt,name=Offset" json:"Offset,omitempty"`
+ Count int32 `protobuf:"varint,5,opt,name=Count" json:"Count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1744,7 +1746,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberReq) ProtoMessage() {}
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{31}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{31}
}
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
@@ -1785,6 +1787,20 @@ func (m *GetGroupAllMemberReq) GetOperationID() string {
return ""
}
+func (m *GetGroupAllMemberReq) GetOffset() int32 {
+ if m != nil {
+ return m.Offset
+ }
+ return 0
+}
+
+func (m *GetGroupAllMemberReq) GetCount() int32 {
+ if m != nil {
+ return m.Count
+ }
+ return 0
+}
+
type GetGroupAllMemberResp struct {
ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"`
ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"`
@@ -1798,7 +1814,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberResp) ProtoMessage() {}
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{32}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{32}
}
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
@@ -1841,8 +1857,8 @@ func (m *GetGroupAllMemberResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo {
type CMSGroup struct {
GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,1,opt,name=GroupInfo" json:"GroupInfo,omitempty"`
- GroupMasterName string `protobuf:"bytes,2,opt,name=GroupMasterName" json:"GroupMasterName,omitempty"`
- GroupMasterId string `protobuf:"bytes,3,opt,name=GroupMasterId" json:"GroupMasterId,omitempty"`
+ GroupOwnerUserName string `protobuf:"bytes,2,opt,name=GroupOwnerUserName" json:"GroupOwnerUserName,omitempty"`
+ GroupOwnerUserID string `protobuf:"bytes,3,opt,name=GroupOwnerUserID" json:"GroupOwnerUserID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1852,7 +1868,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} }
func (m *CMSGroup) String() string { return proto.CompactTextString(m) }
func (*CMSGroup) ProtoMessage() {}
func (*CMSGroup) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{33}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{33}
}
func (m *CMSGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CMSGroup.Unmarshal(m, b)
@@ -1879,16 +1895,16 @@ func (m *CMSGroup) GetGroupInfo() *sdk_ws.GroupInfo {
return nil
}
-func (m *CMSGroup) GetGroupMasterName() string {
+func (m *CMSGroup) GetGroupOwnerUserName() string {
if m != nil {
- return m.GroupMasterName
+ return m.GroupOwnerUserName
}
return ""
}
-func (m *CMSGroup) GetGroupMasterId() string {
+func (m *CMSGroup) GetGroupOwnerUserID() string {
if m != nil {
- return m.GroupMasterId
+ return m.GroupOwnerUserID
}
return ""
}
@@ -1906,7 +1922,7 @@ func (m *GetGroupReq) Reset() { *m = GetGroupReq{} }
func (m *GetGroupReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupReq) ProtoMessage() {}
func (*GetGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{34}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{34}
}
func (m *GetGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupReq.Unmarshal(m, b)
@@ -1960,7 +1976,7 @@ func (m *GetGroupResp) Reset() { *m = GetGroupResp{} }
func (m *GetGroupResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupResp) ProtoMessage() {}
func (*GetGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{35}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{35}
}
func (m *GetGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupResp.Unmarshal(m, b)
@@ -2013,7 +2029,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} }
func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsReq) ProtoMessage() {}
func (*GetGroupsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{36}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{36}
}
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
@@ -2060,7 +2076,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} }
func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsResp) ProtoMessage() {}
func (*GetGroupsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{37}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{37}
}
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
@@ -2102,7 +2118,7 @@ func (m *GetGroupsResp) GetGroupNum() int32 {
}
type GetGroupMemberReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -2113,7 +2129,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} }
func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberReq) ProtoMessage() {}
func (*GetGroupMemberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{38}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{38}
}
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
@@ -2133,9 +2149,9 @@ func (m *GetGroupMemberReq) XXX_DiscardUnknown() {
var xxx_messageInfo_GetGroupMemberReq proto.InternalMessageInfo
-func (m *GetGroupMemberReq) GetGroupId() string {
+func (m *GetGroupMemberReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
@@ -2147,93 +2163,9 @@ func (m *GetGroupMemberReq) GetOperationID() string {
return ""
}
-type OperateGroupStatusReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
- Status int32 `protobuf:"varint,2,opt,name=Status" json:"Status,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *OperateGroupStatusReq) Reset() { *m = OperateGroupStatusReq{} }
-func (m *OperateGroupStatusReq) String() string { return proto.CompactTextString(m) }
-func (*OperateGroupStatusReq) ProtoMessage() {}
-func (*OperateGroupStatusReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{39}
-}
-func (m *OperateGroupStatusReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_OperateGroupStatusReq.Unmarshal(m, b)
-}
-func (m *OperateGroupStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_OperateGroupStatusReq.Marshal(b, m, deterministic)
-}
-func (dst *OperateGroupStatusReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_OperateGroupStatusReq.Merge(dst, src)
-}
-func (m *OperateGroupStatusReq) XXX_Size() int {
- return xxx_messageInfo_OperateGroupStatusReq.Size(m)
-}
-func (m *OperateGroupStatusReq) XXX_DiscardUnknown() {
- xxx_messageInfo_OperateGroupStatusReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_OperateGroupStatusReq proto.InternalMessageInfo
-
-func (m *OperateGroupStatusReq) GetGroupId() string {
- if m != nil {
- return m.GroupId
- }
- return ""
-}
-
-func (m *OperateGroupStatusReq) GetStatus() int32 {
- if m != nil {
- return m.Status
- }
- return 0
-}
-
-func (m *OperateGroupStatusReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
- }
- return ""
-}
-
-type OperateGroupStatusResp struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *OperateGroupStatusResp) Reset() { *m = OperateGroupStatusResp{} }
-func (m *OperateGroupStatusResp) String() string { return proto.CompactTextString(m) }
-func (*OperateGroupStatusResp) ProtoMessage() {}
-func (*OperateGroupStatusResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{40}
-}
-func (m *OperateGroupStatusResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_OperateGroupStatusResp.Unmarshal(m, b)
-}
-func (m *OperateGroupStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_OperateGroupStatusResp.Marshal(b, m, deterministic)
-}
-func (dst *OperateGroupStatusResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_OperateGroupStatusResp.Merge(dst, src)
-}
-func (m *OperateGroupStatusResp) XXX_Size() int {
- return xxx_messageInfo_OperateGroupStatusResp.Size(m)
-}
-func (m *OperateGroupStatusResp) XXX_DiscardUnknown() {
- xxx_messageInfo_OperateGroupStatusResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_OperateGroupStatusResp proto.InternalMessageInfo
-
type OperateUserRoleReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
- UserId string `protobuf:"bytes,2,opt,name=UserId" json:"UserId,omitempty"`
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
+ UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"`
RoleLevel int32 `protobuf:"varint,3,opt,name=RoleLevel" json:"RoleLevel,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -2245,7 +2177,7 @@ func (m *OperateUserRoleReq) Reset() { *m = OperateUserRoleReq{} }
func (m *OperateUserRoleReq) String() string { return proto.CompactTextString(m) }
func (*OperateUserRoleReq) ProtoMessage() {}
func (*OperateUserRoleReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{41}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{39}
}
func (m *OperateUserRoleReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OperateUserRoleReq.Unmarshal(m, b)
@@ -2265,16 +2197,16 @@ func (m *OperateUserRoleReq) XXX_DiscardUnknown() {
var xxx_messageInfo_OperateUserRoleReq proto.InternalMessageInfo
-func (m *OperateUserRoleReq) GetGroupId() string {
+func (m *OperateUserRoleReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
-func (m *OperateUserRoleReq) GetUserId() string {
+func (m *OperateUserRoleReq) GetUserID() string {
if m != nil {
- return m.UserId
+ return m.UserID
}
return ""
}
@@ -2303,7 +2235,7 @@ func (m *OperateUserRoleResp) Reset() { *m = OperateUserRoleResp{} }
func (m *OperateUserRoleResp) String() string { return proto.CompactTextString(m) }
func (*OperateUserRoleResp) ProtoMessage() {}
func (*OperateUserRoleResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{42}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{40}
}
func (m *OperateUserRoleResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OperateUserRoleResp.Unmarshal(m, b)
@@ -2323,160 +2255,84 @@ func (m *OperateUserRoleResp) XXX_DiscardUnknown() {
var xxx_messageInfo_OperateUserRoleResp proto.InternalMessageInfo
-type DeleteGroupReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
+type GetGroupByIDReq struct {
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteGroupReq) Reset() { *m = DeleteGroupReq{} }
-func (m *DeleteGroupReq) String() string { return proto.CompactTextString(m) }
-func (*DeleteGroupReq) ProtoMessage() {}
-func (*DeleteGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{43}
+func (m *GetGroupByIDReq) Reset() { *m = GetGroupByIDReq{} }
+func (m *GetGroupByIDReq) String() string { return proto.CompactTextString(m) }
+func (*GetGroupByIDReq) ProtoMessage() {}
+func (*GetGroupByIDReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_group_077aa2a789cf93ed, []int{41}
}
-func (m *DeleteGroupReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteGroupReq.Unmarshal(m, b)
+func (m *GetGroupByIDReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetGroupByIDReq.Unmarshal(m, b)
}
-func (m *DeleteGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteGroupReq.Marshal(b, m, deterministic)
+func (m *GetGroupByIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetGroupByIDReq.Marshal(b, m, deterministic)
}
-func (dst *DeleteGroupReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteGroupReq.Merge(dst, src)
+func (dst *GetGroupByIDReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetGroupByIDReq.Merge(dst, src)
}
-func (m *DeleteGroupReq) XXX_Size() int {
- return xxx_messageInfo_DeleteGroupReq.Size(m)
+func (m *GetGroupByIDReq) XXX_Size() int {
+ return xxx_messageInfo_GetGroupByIDReq.Size(m)
}
-func (m *DeleteGroupReq) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteGroupReq.DiscardUnknown(m)
+func (m *GetGroupByIDReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetGroupByIDReq.DiscardUnknown(m)
}
-var xxx_messageInfo_DeleteGroupReq proto.InternalMessageInfo
+var xxx_messageInfo_GetGroupByIDReq proto.InternalMessageInfo
-func (m *DeleteGroupReq) GetGroupId() string {
+func (m *GetGroupByIDReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
-func (m *DeleteGroupReq) GetOperationID() string {
+func (m *GetGroupByIDReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
-type DeleteGroupResp struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DeleteGroupResp) Reset() { *m = DeleteGroupResp{} }
-func (m *DeleteGroupResp) String() string { return proto.CompactTextString(m) }
-func (*DeleteGroupResp) ProtoMessage() {}
-func (*DeleteGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{44}
-}
-func (m *DeleteGroupResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteGroupResp.Unmarshal(m, b)
-}
-func (m *DeleteGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteGroupResp.Marshal(b, m, deterministic)
-}
-func (dst *DeleteGroupResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteGroupResp.Merge(dst, src)
-}
-func (m *DeleteGroupResp) XXX_Size() int {
- return xxx_messageInfo_DeleteGroupResp.Size(m)
-}
-func (m *DeleteGroupResp) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteGroupResp.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeleteGroupResp proto.InternalMessageInfo
-
-type GetGroupByIdReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
- OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *GetGroupByIdReq) Reset() { *m = GetGroupByIdReq{} }
-func (m *GetGroupByIdReq) String() string { return proto.CompactTextString(m) }
-func (*GetGroupByIdReq) ProtoMessage() {}
-func (*GetGroupByIdReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{45}
-}
-func (m *GetGroupByIdReq) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetGroupByIdReq.Unmarshal(m, b)
-}
-func (m *GetGroupByIdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetGroupByIdReq.Marshal(b, m, deterministic)
-}
-func (dst *GetGroupByIdReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetGroupByIdReq.Merge(dst, src)
-}
-func (m *GetGroupByIdReq) XXX_Size() int {
- return xxx_messageInfo_GetGroupByIdReq.Size(m)
-}
-func (m *GetGroupByIdReq) XXX_DiscardUnknown() {
- xxx_messageInfo_GetGroupByIdReq.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GetGroupByIdReq proto.InternalMessageInfo
-
-func (m *GetGroupByIdReq) GetGroupId() string {
- if m != nil {
- return m.GroupId
- }
- return ""
-}
-
-func (m *GetGroupByIdReq) GetOperationID() string {
- if m != nil {
- return m.OperationID
- }
- return ""
-}
-
-type GetGroupByIdResp struct {
+type GetGroupByIDResp struct {
CMSGroup *CMSGroup `protobuf:"bytes,1,opt,name=CMSGroup" json:"CMSGroup,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
-func (m *GetGroupByIdResp) Reset() { *m = GetGroupByIdResp{} }
-func (m *GetGroupByIdResp) String() string { return proto.CompactTextString(m) }
-func (*GetGroupByIdResp) ProtoMessage() {}
-func (*GetGroupByIdResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{46}
+func (m *GetGroupByIDResp) Reset() { *m = GetGroupByIDResp{} }
+func (m *GetGroupByIDResp) String() string { return proto.CompactTextString(m) }
+func (*GetGroupByIDResp) ProtoMessage() {}
+func (*GetGroupByIDResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_group_077aa2a789cf93ed, []int{42}
}
-func (m *GetGroupByIdResp) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_GetGroupByIdResp.Unmarshal(m, b)
+func (m *GetGroupByIDResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetGroupByIDResp.Unmarshal(m, b)
}
-func (m *GetGroupByIdResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_GetGroupByIdResp.Marshal(b, m, deterministic)
+func (m *GetGroupByIDResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetGroupByIDResp.Marshal(b, m, deterministic)
}
-func (dst *GetGroupByIdResp) XXX_Merge(src proto.Message) {
- xxx_messageInfo_GetGroupByIdResp.Merge(dst, src)
+func (dst *GetGroupByIDResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetGroupByIDResp.Merge(dst, src)
}
-func (m *GetGroupByIdResp) XXX_Size() int {
- return xxx_messageInfo_GetGroupByIdResp.Size(m)
+func (m *GetGroupByIDResp) XXX_Size() int {
+ return xxx_messageInfo_GetGroupByIDResp.Size(m)
}
-func (m *GetGroupByIdResp) XXX_DiscardUnknown() {
- xxx_messageInfo_GetGroupByIdResp.DiscardUnknown(m)
+func (m *GetGroupByIDResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetGroupByIDResp.DiscardUnknown(m)
}
-var xxx_messageInfo_GetGroupByIdResp proto.InternalMessageInfo
+var xxx_messageInfo_GetGroupByIDResp proto.InternalMessageInfo
-func (m *GetGroupByIdResp) GetCMSGroup() *CMSGroup {
+func (m *GetGroupByIDResp) GetCMSGroup() *CMSGroup {
if m != nil {
return m.CMSGroup
}
@@ -2484,7 +2340,7 @@ func (m *GetGroupByIdResp) GetCMSGroup() *CMSGroup {
}
type GetGroupMembersCMSReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
UserName string `protobuf:"bytes,2,opt,name=UserName" json:"UserName,omitempty"`
Pagination *sdk_ws.RequestPagination `protobuf:"bytes,3,opt,name=Pagination" json:"Pagination,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
@@ -2497,7 +2353,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} }
func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSReq) ProtoMessage() {}
func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{47}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{43}
}
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
@@ -2517,9 +2373,9 @@ func (m *GetGroupMembersCMSReq) XXX_DiscardUnknown() {
var xxx_messageInfo_GetGroupMembersCMSReq proto.InternalMessageInfo
-func (m *GetGroupMembersCMSReq) GetGroupId() string {
+func (m *GetGroupMembersCMSReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
@@ -2558,7 +2414,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{}
func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSResp) ProtoMessage() {}
func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{48}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{44}
}
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
@@ -2600,10 +2456,10 @@ func (m *GetGroupMembersCMSResp) GetMemberNums() int32 {
}
type RemoveGroupMembersCMSReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
- UserIds []string `protobuf:"bytes,2,rep,name=UserIds" json:"UserIds,omitempty"`
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
+ UserIDList []string `protobuf:"bytes,2,rep,name=UserIDList" json:"UserIDList,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
- OpUserId string `protobuf:"bytes,4,opt,name=OpUserId" json:"OpUserId,omitempty"`
+ OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -2613,7 +2469,7 @@ func (m *RemoveGroupMembersCMSReq) Reset() { *m = RemoveGroupMembersCMSR
func (m *RemoveGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
func (*RemoveGroupMembersCMSReq) ProtoMessage() {}
func (*RemoveGroupMembersCMSReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{49}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{45}
}
func (m *RemoveGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveGroupMembersCMSReq.Unmarshal(m, b)
@@ -2633,16 +2489,16 @@ func (m *RemoveGroupMembersCMSReq) XXX_DiscardUnknown() {
var xxx_messageInfo_RemoveGroupMembersCMSReq proto.InternalMessageInfo
-func (m *RemoveGroupMembersCMSReq) GetGroupId() string {
+func (m *RemoveGroupMembersCMSReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
-func (m *RemoveGroupMembersCMSReq) GetUserIds() []string {
+func (m *RemoveGroupMembersCMSReq) GetUserIDList() []string {
if m != nil {
- return m.UserIds
+ return m.UserIDList
}
return nil
}
@@ -2654,9 +2510,9 @@ func (m *RemoveGroupMembersCMSReq) GetOperationID() string {
return ""
}
-func (m *RemoveGroupMembersCMSReq) GetOpUserId() string {
+func (m *RemoveGroupMembersCMSReq) GetOpUserID() string {
if m != nil {
- return m.OpUserId
+ return m.OpUserID
}
return ""
}
@@ -2673,7 +2529,7 @@ func (m *RemoveGroupMembersCMSResp) Reset() { *m = RemoveGroupMembersCMS
func (m *RemoveGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
func (*RemoveGroupMembersCMSResp) ProtoMessage() {}
func (*RemoveGroupMembersCMSResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{50}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{46}
}
func (m *RemoveGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveGroupMembersCMSResp.Unmarshal(m, b)
@@ -2708,10 +2564,10 @@ func (m *RemoveGroupMembersCMSResp) GetFailed() []string {
}
type AddGroupMembersCMSReq struct {
- GroupId string `protobuf:"bytes,1,opt,name=GroupId" json:"GroupId,omitempty"`
- UserIds []string `protobuf:"bytes,2,rep,name=UserIds" json:"UserIds,omitempty"`
- OperationId string `protobuf:"bytes,3,opt,name=OperationId" json:"OperationId,omitempty"`
- OpUserId string `protobuf:"bytes,4,opt,name=OpUserId" json:"OpUserId,omitempty"`
+ GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`
+ UserIDList []string `protobuf:"bytes,2,rep,name=UserIDList" json:"UserIDList,omitempty"`
+ OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
+ OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -2721,7 +2577,7 @@ func (m *AddGroupMembersCMSReq) Reset() { *m = AddGroupMembersCMSReq{} }
func (m *AddGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
func (*AddGroupMembersCMSReq) ProtoMessage() {}
func (*AddGroupMembersCMSReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{51}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{47}
}
func (m *AddGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddGroupMembersCMSReq.Unmarshal(m, b)
@@ -2741,30 +2597,30 @@ func (m *AddGroupMembersCMSReq) XXX_DiscardUnknown() {
var xxx_messageInfo_AddGroupMembersCMSReq proto.InternalMessageInfo
-func (m *AddGroupMembersCMSReq) GetGroupId() string {
+func (m *AddGroupMembersCMSReq) GetGroupID() string {
if m != nil {
- return m.GroupId
+ return m.GroupID
}
return ""
}
-func (m *AddGroupMembersCMSReq) GetUserIds() []string {
+func (m *AddGroupMembersCMSReq) GetUserIDList() []string {
if m != nil {
- return m.UserIds
+ return m.UserIDList
}
return nil
}
-func (m *AddGroupMembersCMSReq) GetOperationId() string {
+func (m *AddGroupMembersCMSReq) GetOperationID() string {
if m != nil {
- return m.OperationId
+ return m.OperationID
}
return ""
}
-func (m *AddGroupMembersCMSReq) GetOpUserId() string {
+func (m *AddGroupMembersCMSReq) GetOpUserID() string {
if m != nil {
- return m.OpUserId
+ return m.OpUserID
}
return ""
}
@@ -2781,7 +2637,7 @@ func (m *AddGroupMembersCMSResp) Reset() { *m = AddGroupMembersCMSResp{}
func (m *AddGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
func (*AddGroupMembersCMSResp) ProtoMessage() {}
func (*AddGroupMembersCMSResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{52}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{48}
}
func (m *AddGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddGroupMembersCMSResp.Unmarshal(m, b)
@@ -2828,7 +2684,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} }
func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) }
func (*DismissGroupReq) ProtoMessage() {}
func (*DismissGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{53}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{49}
}
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
@@ -2880,7 +2736,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} }
func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) }
func (*DismissGroupResp) ProtoMessage() {}
func (*DismissGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{54}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{50}
}
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
@@ -2922,7 +2778,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} }
func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberReq) ProtoMessage() {}
func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{55}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{51}
}
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
@@ -2988,7 +2844,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} }
func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberResp) ProtoMessage() {}
func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{56}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{52}
}
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
@@ -3029,7 +2885,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR
func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberReq) ProtoMessage() {}
func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{57}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{53}
}
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
@@ -3088,7 +2944,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember
func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberResp) ProtoMessage() {}
func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{58}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{54}
}
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
@@ -3128,7 +2984,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} }
func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupReq) ProtoMessage() {}
func (*MuteGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{59}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{55}
}
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
@@ -3180,7 +3036,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} }
func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupResp) ProtoMessage() {}
func (*MuteGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{60}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{56}
}
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
@@ -3220,7 +3076,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} }
func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupReq) ProtoMessage() {}
func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{61}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{57}
}
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
@@ -3272,7 +3128,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} }
func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupResp) ProtoMessage() {}
func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{62}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{58}
}
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
@@ -3314,7 +3170,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam
func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberNicknameReq) ProtoMessage() {}
func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{63}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{59}
}
func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b)
@@ -3380,7 +3236,7 @@ func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNickna
func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberNicknameResp) ProtoMessage() {}
func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{64}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{60}
}
func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b)
@@ -3420,7 +3276,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL
func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListReq) ProtoMessage() {}
func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{65}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{61}
}
func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b)
@@ -3473,7 +3329,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup
func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListResp) ProtoMessage() {}
func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{66}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{62}
}
func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b)
@@ -3520,7 +3376,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} }
func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoReq) ProtoMessage() {}
func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{67}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{63}
}
func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b)
@@ -3573,7 +3429,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{}
func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoResp) ProtoMessage() {}
func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{68}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{64}
}
func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b)
@@ -3625,7 +3481,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} }
func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoReq) ProtoMessage() {}
func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{69}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{65}
}
func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b)
@@ -3712,7 +3568,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{}
func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoResp) ProtoMessage() {}
func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_group_d529c7a0e85dbd90, []int{70}
+ return fileDescriptor_group_077aa2a789cf93ed, []int{66}
}
func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b)
@@ -3739,6 +3595,114 @@ func (m *SetGroupMemberInfoResp) GetCommonResp() *CommonResp {
return nil
}
+type GetGroupAbstractInfoReq struct {
+ GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"`
+ OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"`
+ OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq{} }
+func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) }
+func (*GetGroupAbstractInfoReq) ProtoMessage() {}
+func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_group_077aa2a789cf93ed, []int{67}
+}
+func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b)
+}
+func (m *GetGroupAbstractInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetGroupAbstractInfoReq.Marshal(b, m, deterministic)
+}
+func (dst *GetGroupAbstractInfoReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetGroupAbstractInfoReq.Merge(dst, src)
+}
+func (m *GetGroupAbstractInfoReq) XXX_Size() int {
+ return xxx_messageInfo_GetGroupAbstractInfoReq.Size(m)
+}
+func (m *GetGroupAbstractInfoReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetGroupAbstractInfoReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetGroupAbstractInfoReq proto.InternalMessageInfo
+
+func (m *GetGroupAbstractInfoReq) GetGroupID() string {
+ if m != nil {
+ return m.GroupID
+ }
+ return ""
+}
+
+func (m *GetGroupAbstractInfoReq) GetOpUserID() string {
+ if m != nil {
+ return m.OpUserID
+ }
+ return ""
+}
+
+func (m *GetGroupAbstractInfoReq) GetOperationID() string {
+ if m != nil {
+ return m.OperationID
+ }
+ return ""
+}
+
+type GetGroupAbstractInfoResp struct {
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
+ GroupMemberNumber int32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"`
+ GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash" json:"groupMemberListHash,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoResp{} }
+func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) }
+func (*GetGroupAbstractInfoResp) ProtoMessage() {}
+func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_group_077aa2a789cf93ed, []int{68}
+}
+func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b)
+}
+func (m *GetGroupAbstractInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GetGroupAbstractInfoResp.Marshal(b, m, deterministic)
+}
+func (dst *GetGroupAbstractInfoResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetGroupAbstractInfoResp.Merge(dst, src)
+}
+func (m *GetGroupAbstractInfoResp) XXX_Size() int {
+ return xxx_messageInfo_GetGroupAbstractInfoResp.Size(m)
+}
+func (m *GetGroupAbstractInfoResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetGroupAbstractInfoResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetGroupAbstractInfoResp proto.InternalMessageInfo
+
+func (m *GetGroupAbstractInfoResp) GetCommonResp() *CommonResp {
+ if m != nil {
+ return m.CommonResp
+ }
+ return nil
+}
+
+func (m *GetGroupAbstractInfoResp) GetGroupMemberNumber() int32 {
+ if m != nil {
+ return m.GroupMemberNumber
+ }
+ return 0
+}
+
+func (m *GetGroupAbstractInfoResp) GetGroupMemberListHash() uint64 {
+ if m != nil {
+ return m.GroupMemberListHash
+ }
+ return 0
+}
+
func init() {
proto.RegisterType((*CommonResp)(nil), "group.CommonResp")
proto.RegisterType((*GroupAddMemberInfo)(nil), "group.GroupAddMemberInfo")
@@ -3779,14 +3743,10 @@ func init() {
proto.RegisterType((*GetGroupsReq)(nil), "group.GetGroupsReq")
proto.RegisterType((*GetGroupsResp)(nil), "group.GetGroupsResp")
proto.RegisterType((*GetGroupMemberReq)(nil), "group.GetGroupMemberReq")
- proto.RegisterType((*OperateGroupStatusReq)(nil), "group.OperateGroupStatusReq")
- proto.RegisterType((*OperateGroupStatusResp)(nil), "group.OperateGroupStatusResp")
proto.RegisterType((*OperateUserRoleReq)(nil), "group.OperateUserRoleReq")
proto.RegisterType((*OperateUserRoleResp)(nil), "group.OperateUserRoleResp")
- proto.RegisterType((*DeleteGroupReq)(nil), "group.DeleteGroupReq")
- proto.RegisterType((*DeleteGroupResp)(nil), "group.DeleteGroupResp")
- proto.RegisterType((*GetGroupByIdReq)(nil), "group.GetGroupByIdReq")
- proto.RegisterType((*GetGroupByIdResp)(nil), "group.GetGroupByIdResp")
+ proto.RegisterType((*GetGroupByIDReq)(nil), "group.GetGroupByIDReq")
+ proto.RegisterType((*GetGroupByIDResp)(nil), "group.GetGroupByIDResp")
proto.RegisterType((*GetGroupMembersCMSReq)(nil), "group.GetGroupMembersCMSReq")
proto.RegisterType((*GetGroupMembersCMSResp)(nil), "group.GetGroupMembersCMSResp")
proto.RegisterType((*RemoveGroupMembersCMSReq)(nil), "group.RemoveGroupMembersCMSReq")
@@ -3811,6 +3771,8 @@ func init() {
proto.RegisterType((*GetSuperGroupsInfoResp)(nil), "group.GetSuperGroupsInfoResp")
proto.RegisterType((*SetGroupMemberInfoReq)(nil), "group.SetGroupMemberInfoReq")
proto.RegisterType((*SetGroupMemberInfoResp)(nil), "group.SetGroupMemberInfoResp")
+ proto.RegisterType((*GetGroupAbstractInfoReq)(nil), "group.GetGroupAbstractInfoReq")
+ proto.RegisterType((*GetGroupAbstractInfoResp)(nil), "group.GetGroupAbstractInfoResp")
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -3839,12 +3801,10 @@ type GroupClient interface {
GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error)
InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error)
GetGroupAllMember(ctx context.Context, in *GetGroupAllMemberReq, opts ...grpc.CallOption) (*GetGroupAllMemberResp, error)
- GetGroupById(ctx context.Context, in *GetGroupByIdReq, opts ...grpc.CallOption) (*GetGroupByIdResp, error)
+ GetGroupByID(ctx context.Context, in *GetGroupByIDReq, opts ...grpc.CallOption) (*GetGroupByIDResp, error)
GetGroup(ctx context.Context, in *GetGroupReq, opts ...grpc.CallOption) (*GetGroupResp, error)
GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error)
- OperateGroupStatus(ctx context.Context, in *OperateGroupStatusReq, opts ...grpc.CallOption) (*OperateGroupStatusResp, error)
OperateUserRole(ctx context.Context, in *OperateUserRoleReq, opts ...grpc.CallOption) (*OperateUserRoleResp, error)
- DeleteGroup(ctx context.Context, in *DeleteGroupReq, opts ...grpc.CallOption) (*DeleteGroupResp, error)
GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error)
RemoveGroupMembersCMS(ctx context.Context, in *RemoveGroupMembersCMSReq, opts ...grpc.CallOption) (*RemoveGroupMembersCMSResp, error)
AddGroupMembersCMS(ctx context.Context, in *AddGroupMembersCMSReq, opts ...grpc.CallOption) (*AddGroupMembersCMSResp, error)
@@ -3857,6 +3817,7 @@ type GroupClient interface {
GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error)
GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error)
SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error)
+ GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error)
}
type groupClient struct {
@@ -4002,9 +3963,9 @@ func (c *groupClient) GetGroupAllMember(ctx context.Context, in *GetGroupAllMemb
return out, nil
}
-func (c *groupClient) GetGroupById(ctx context.Context, in *GetGroupByIdReq, opts ...grpc.CallOption) (*GetGroupByIdResp, error) {
- out := new(GetGroupByIdResp)
- err := grpc.Invoke(ctx, "/group.group/GetGroupById", in, out, c.cc, opts...)
+func (c *groupClient) GetGroupByID(ctx context.Context, in *GetGroupByIDReq, opts ...grpc.CallOption) (*GetGroupByIDResp, error) {
+ out := new(GetGroupByIDResp)
+ err := grpc.Invoke(ctx, "/group.group/GetGroupByID", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@@ -4029,15 +3990,6 @@ func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...g
return out, nil
}
-func (c *groupClient) OperateGroupStatus(ctx context.Context, in *OperateGroupStatusReq, opts ...grpc.CallOption) (*OperateGroupStatusResp, error) {
- out := new(OperateGroupStatusResp)
- err := grpc.Invoke(ctx, "/group.group/OperateGroupStatus", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *groupClient) OperateUserRole(ctx context.Context, in *OperateUserRoleReq, opts ...grpc.CallOption) (*OperateUserRoleResp, error) {
out := new(OperateUserRoleResp)
err := grpc.Invoke(ctx, "/group.group/OperateUserRole", in, out, c.cc, opts...)
@@ -4047,15 +3999,6 @@ func (c *groupClient) OperateUserRole(ctx context.Context, in *OperateUserRoleRe
return out, nil
}
-func (c *groupClient) DeleteGroup(ctx context.Context, in *DeleteGroupReq, opts ...grpc.CallOption) (*DeleteGroupResp, error) {
- out := new(DeleteGroupResp)
- err := grpc.Invoke(ctx, "/group.group/DeleteGroup", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) {
out := new(GetGroupMembersCMSResp)
err := grpc.Invoke(ctx, "/group.group/GetGroupMembersCMS", in, out, c.cc, opts...)
@@ -4164,6 +4107,15 @@ func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMember
return out, nil
}
+func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) {
+ out := new(GetGroupAbstractInfoResp)
+ err := grpc.Invoke(ctx, "/group.group/GetGroupAbstractInfo", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// Server API for Group service
type GroupServer interface {
@@ -4182,12 +4134,10 @@ type GroupServer interface {
GetJoinedGroupList(context.Context, *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error)
InviteUserToGroup(context.Context, *InviteUserToGroupReq) (*InviteUserToGroupResp, error)
GetGroupAllMember(context.Context, *GetGroupAllMemberReq) (*GetGroupAllMemberResp, error)
- GetGroupById(context.Context, *GetGroupByIdReq) (*GetGroupByIdResp, error)
+ GetGroupByID(context.Context, *GetGroupByIDReq) (*GetGroupByIDResp, error)
GetGroup(context.Context, *GetGroupReq) (*GetGroupResp, error)
GetGroups(context.Context, *GetGroupsReq) (*GetGroupsResp, error)
- OperateGroupStatus(context.Context, *OperateGroupStatusReq) (*OperateGroupStatusResp, error)
OperateUserRole(context.Context, *OperateUserRoleReq) (*OperateUserRoleResp, error)
- DeleteGroup(context.Context, *DeleteGroupReq) (*DeleteGroupResp, error)
GetGroupMembersCMS(context.Context, *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error)
RemoveGroupMembersCMS(context.Context, *RemoveGroupMembersCMSReq) (*RemoveGroupMembersCMSResp, error)
AddGroupMembersCMS(context.Context, *AddGroupMembersCMSReq) (*AddGroupMembersCMSResp, error)
@@ -4200,6 +4150,7 @@ type GroupServer interface {
GetJoinedSuperGroupList(context.Context, *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error)
GetSuperGroupsInfo(context.Context, *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error)
SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error)
+ GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error)
}
func RegisterGroupServer(s *grpc.Server, srv GroupServer) {
@@ -4476,20 +4427,20 @@ func _Group_GetGroupAllMember_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
-func _Group_GetGroupById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetGroupByIdReq)
+func _Group_GetGroupByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetGroupByIDReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(GroupServer).GetGroupById(ctx, in)
+ return srv.(GroupServer).GetGroupByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/group.group/GetGroupById",
+ FullMethod: "/group.group/GetGroupByID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(GroupServer).GetGroupById(ctx, req.(*GetGroupByIdReq))
+ return srv.(GroupServer).GetGroupByID(ctx, req.(*GetGroupByIDReq))
}
return interceptor(ctx, in, info, handler)
}
@@ -4530,24 +4481,6 @@ func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
-func _Group_OperateGroupStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(OperateGroupStatusReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(GroupServer).OperateGroupStatus(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/group.group/OperateGroupStatus",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(GroupServer).OperateGroupStatus(ctx, req.(*OperateGroupStatusReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _Group_OperateUserRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OperateUserRoleReq)
if err := dec(in); err != nil {
@@ -4566,24 +4499,6 @@ func _Group_OperateUserRole_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
-func _Group_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteGroupReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(GroupServer).DeleteGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/group.group/DeleteGroup",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(GroupServer).DeleteGroup(ctx, req.(*DeleteGroupReq))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _Group_GetGroupMembersCMS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGroupMembersCMSReq)
if err := dec(in); err != nil {
@@ -4800,6 +4715,24 @@ func _Group_SetGroupMemberInfo_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
+func _Group_GetGroupAbstractInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetGroupAbstractInfoReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServer).GetGroupAbstractInfo(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/group.group/GetGroupAbstractInfo",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServer).GetGroupAbstractInfo(ctx, req.(*GetGroupAbstractInfoReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Group_serviceDesc = grpc.ServiceDesc{
ServiceName: "group.group",
HandlerType: (*GroupServer)(nil),
@@ -4865,8 +4798,8 @@ var _Group_serviceDesc = grpc.ServiceDesc{
Handler: _Group_GetGroupAllMember_Handler,
},
{
- MethodName: "GetGroupById",
- Handler: _Group_GetGroupById_Handler,
+ MethodName: "GetGroupByID",
+ Handler: _Group_GetGroupByID_Handler,
},
{
MethodName: "GetGroup",
@@ -4876,18 +4809,10 @@ var _Group_serviceDesc = grpc.ServiceDesc{
MethodName: "GetGroups",
Handler: _Group_GetGroups_Handler,
},
- {
- MethodName: "OperateGroupStatus",
- Handler: _Group_OperateGroupStatus_Handler,
- },
{
MethodName: "OperateUserRole",
Handler: _Group_OperateUserRole_Handler,
},
- {
- MethodName: "DeleteGroup",
- Handler: _Group_DeleteGroup_Handler,
- },
{
MethodName: "GetGroupMembersCMS",
Handler: _Group_GetGroupMembersCMS_Handler,
@@ -4936,164 +4861,168 @@ var _Group_serviceDesc = grpc.ServiceDesc{
MethodName: "SetGroupMemberInfo",
Handler: _Group_SetGroupMemberInfo_Handler,
},
+ {
+ MethodName: "GetGroupAbstractInfo",
+ Handler: _Group_GetGroupAbstractInfo_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "group/group.proto",
}
-func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_d529c7a0e85dbd90) }
+func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_077aa2a789cf93ed) }
-var fileDescriptor_group_d529c7a0e85dbd90 = []byte{
- // 2407 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x4f, 0x6f, 0x1c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, 0xdd, 0xea, 0x8f, 0x01, 0x65, 0x6f, 0x7e, 0x72,
- 0x4a, 0xed, 0xc5, 0x5b, 0x4e, 0xa9, 0xbf, 0x32, 0x6e, 0xd6, 0x9f, 0xd7, 0xd6, 0xf8, 0x1f, 0xcd,
- 0x1f, 0xb3, 0xef, 0xcb, 0xeb, 0xec, 0xde, 0x79, 0xff, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a,
- 0x3c, 0xf8, 0x82, 0xed, 0x2c, 0x00, 0x00,
+var fileDescriptor_group_077aa2a789cf93ed = []byte{
+ // 2401 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4d, 0x6f, 0x1c, 0x49,
+ 0x55, 0x3d, 0xe3, 0x89, 0x3d, 0xcf, 0x9e, 0x8c, 0x53, 0x8e, 0x9d, 0x49, 0xc7, 0xeb, 0x38, 0xb5,
+ 0x61, 0x89, 0x20, 0x38, 0xe0, 0x48, 0x11, 0xb0, 0x88, 0x10, 0xdb, 0x49, 0xec, 0x24, 0xb6, 0x49,
+ 0x4f, 0x16, 0xa4, 0x48, 0x28, 0x8c, 0x67, 0x6a, 0x9a, 0xc1, 0x33, 0xdd, 0xed, 0xae, 0x1e, 0x3b,
+ 0x70, 0x59, 0x71, 0x59, 0x09, 0x84, 0xb4, 0x7c, 0x5c, 0x17, 0xc1, 0x72, 0x81, 0x03, 0x48, 0x1c,
+ 0xe0, 0x8c, 0x38, 0x70, 0xe3, 0x0f, 0x70, 0xe5, 0x0f, 0xf0, 0x17, 0x50, 0x57, 0x55, 0x57, 0x57,
+ 0x77, 0x75, 0xb7, 0x27, 0xed, 0x64, 0xc3, 0xa5, 0xa5, 0x7a, 0xf5, 0xaa, 0xea, 0x7d, 0xd5, 0xab,
+ 0xf7, 0xd1, 0x70, 0xc1, 0xf6, 0xdd, 0xb1, 0x77, 0x8b, 0x7d, 0xd7, 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 0x82, 0xa5, 0xa9, 0xa9, 0x79,
+ 0xa2, 0x34, 0xb5, 0x64, 0x3a, 0xb7, 0x0d, 0xcd, 0xd4, 0xa6, 0x92, 0x3b, 0x3d, 0xd7, 0x94, 0xdc,
+ 0x65, 0x25, 0x86, 0xdf, 0x4b, 0xc7, 0x5d, 0x51, 0xee, 0x84, 0x56, 0x53, 0xaf, 0x9f, 0x96, 0x03,
+ 0x9a, 0xd7, 0x4e, 0xc1, 0xe0, 0x2f, 0x65, 0x4e, 0x52, 0xa3, 0xbe, 0x94, 0x39, 0x99, 0x96, 0xfa,
+ 0x52, 0xe6, 0xe6, 0x45, 0xfc, 0xae, 0xa4, 0xd2, 0x05, 0xf5, 0xae, 0xe8, 0x39, 0x8c, 0x7a, 0x57,
+ 0xb2, 0xf2, 0x8c, 0xa7, 0x80, 0xf4, 0x58, 0x54, 0x6e, 0x99, 0x99, 0x0a, 0xc8, 0x2d, 0x73, 0x82,
+ 0xd8, 0xef, 0x2a, 0xfd, 0x41, 0x25, 0x3a, 0x44, 0xe9, 0xe7, 0x23, 0x15, 0xae, 0x9a, 0x57, 0x0b,
+ 0xe7, 0xa9, 0xb7, 0xd1, 0x7c, 0xde, 0x58, 0xe3, 0xff, 0x46, 0xbf, 0xcf, 0xbe, 0x07, 0xe7, 0x58,
+ 0x88, 0x7d, 0xfb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xe2, 0x3c, 0x77, 0x37, 0x2d, 0x00,
+ 0x00,
}
diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto
index 3d9e9de28..cffe91886 100644
--- a/pkg/proto/group/group.proto
+++ b/pkg/proto/group/group.proto
@@ -204,6 +204,8 @@ message GetGroupAllMemberReq {
string GroupID = 1;
string OpUserID = 2; //No verification permission
string OperationID = 3;
+ int32 Offset = 4;
+ int32 Count = 5;
}
message GetGroupAllMemberResp {
int32 ErrCode = 1;
@@ -213,8 +215,8 @@ message GetGroupAllMemberResp {
message CMSGroup {
server_api_params.GroupInfo GroupInfo = 1;
- string GroupMasterName = 2;
- string GroupMasterId = 3;
+ string GroupOwnerUserName = 2;
+ string GroupOwnerUserID = 3;
}
message GetGroupReq {
@@ -241,23 +243,13 @@ message GetGroupsResp {
}
message GetGroupMemberReq {
- string GroupId = 1;
+ string GroupID = 1;
string OperationID = 2;
}
-message OperateGroupStatusReq {
- string GroupId = 1;
- int32 Status = 2;
- string OperationID = 3;
-}
-
-message OperateGroupStatusResp {
-
-}
-
message OperateUserRoleReq {
- string GroupId = 1;
- string UserId = 2;
+ string GroupID = 1;
+ string UserID = 2;
int32 RoleLevel = 3;
string OperationID = 4;
}
@@ -266,26 +258,17 @@ message OperateUserRoleResp {
}
-message DeleteGroupReq {
- string GroupId = 1;
+message GetGroupByIDReq {
+ string GroupID = 1;
string OperationID = 2;
}
-message DeleteGroupResp {
-
-}
-
-message GetGroupByIdReq {
- string GroupId = 1;
- string OperationID = 2;
-}
-
-message GetGroupByIdResp {
+message GetGroupByIDResp {
CMSGroup CMSGroup = 1;
}
message GetGroupMembersCMSReq {
- string GroupId = 1;
+ string GroupID = 1;
string UserName = 2;
server_api_params.RequestPagination Pagination = 3;
string OperationID = 4;
@@ -298,10 +281,10 @@ message GetGroupMembersCMSResp {
}
message RemoveGroupMembersCMSReq {
- string GroupId = 1;
- repeated string UserIds = 2;
+ string GroupID = 1;
+ repeated string UserIDList = 2;
string OperationID = 3;
- string OpUserId = 4;
+ string OpUserID = 4;
}
message RemoveGroupMembersCMSResp {
@@ -310,10 +293,10 @@ message RemoveGroupMembersCMSResp {
}
message AddGroupMembersCMSReq {
- string GroupId = 1;
- repeated string UserIds = 2;
- string OperationId = 3;
- string OpUserId = 4;
+ string GroupID = 1;
+ repeated string UserIDList = 2;
+ string OperationID = 3;
+ string OpUserID = 4;
}
message AddGroupMembersCMSResp {
@@ -431,6 +414,19 @@ message SetGroupMemberInfoResp{
CommonResp CommonResp = 1;
}
+message GetGroupAbstractInfoReq{
+ string groupID = 1;
+ string opUserID = 2;
+ string operationID = 3;
+}
+
+message GetGroupAbstractInfoResp{
+ CommonResp CommonResp = 1;
+ int32 groupMemberNumber = 2;
+ uint64 groupMemberListHash = 3;
+}
+
+
service group{
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
rpc joinGroup(JoinGroupReq) returns(JoinGroupResp);
@@ -448,12 +444,10 @@ service group{
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp);
- rpc GetGroupById(GetGroupByIdReq) returns(GetGroupByIdResp);
+ rpc GetGroupByID(GetGroupByIDReq) returns(GetGroupByIDResp);
rpc GetGroup(GetGroupReq) returns(GetGroupResp);
rpc GetGroups(GetGroupsReq) returns(GetGroupsResp);
- rpc OperateGroupStatus(OperateGroupStatusReq) returns(OperateGroupStatusResp);
rpc OperateUserRole(OperateUserRoleReq) returns(OperateUserRoleResp);
- rpc DeleteGroup(DeleteGroupReq) returns(DeleteGroupResp);
rpc GetGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp);
rpc RemoveGroupMembersCMS(RemoveGroupMembersCMSReq) returns(RemoveGroupMembersCMSResp);
rpc AddGroupMembersCMS(AddGroupMembersCMSReq) returns(AddGroupMembersCMSResp);
@@ -469,7 +463,7 @@ service group{
rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
rpc SetGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp);
-
+ rpc GetGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp);
}
diff --git a/pkg/proto/rtc/rtc.proto b/pkg/proto/rtc/rtc.proto
index cb99f9b84..aafc9345f 100644
--- a/pkg/proto/rtc/rtc.proto
+++ b/pkg/proto/rtc/rtc.proto
@@ -100,6 +100,7 @@ message SignalReq {
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
+ SignalGetRoomByGroupIDReq GetRoomByGroupID = 7;
}
}
@@ -111,6 +112,7 @@ message SignalResp {
SignalAcceptReply accept = 4;
SignalHungUpReply hungUp = 5;
SignalRejectReply reject = 6;
+ SignalGetRoomByGroupIDReply GetRoomByGroupID = 7;
}
}
@@ -203,6 +205,19 @@ message SignalRejectReply {
}
+message SignalGetRoomByGroupIDReq {
+ string opUserID = 1;
+ string groupID = 2;
+}
+
+message SignalGetRoomByGroupIDReply {
+ InvitationInfo invitation = 1;
+ repeated string onConnectingUserIDList = 2;
+ string token = 3;
+ string roomID = 4;
+ string liveURL = 5;
+}
+
message SignalMessageAssembleReq {
SignalReq signalReq = 1;
string operationID = 2;
diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go
index d6c81186b..5e99b623f 100644
--- a/pkg/proto/sdk_ws/ws.pb.go
+++ b/pkg/proto/sdk_ws/ws.pb.go
@@ -46,7 +46,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} }
func (m *GroupInfo) String() string { return proto.CompactTextString(m) }
func (*GroupInfo) ProtoMessage() {}
func (*GroupInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{0}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{0}
}
func (m *GroupInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfo.Unmarshal(m, b)
@@ -204,7 +204,7 @@ func (m *GroupInfoForSet) Reset() { *m = GroupInfoForSet{} }
func (m *GroupInfoForSet) String() string { return proto.CompactTextString(m) }
func (*GroupInfoForSet) ProtoMessage() {}
func (*GroupInfoForSet) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{1}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{1}
}
func (m *GroupInfoForSet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfoForSet.Unmarshal(m, b)
@@ -309,7 +309,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} }
func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) }
func (*GroupMemberFullInfo) ProtoMessage() {}
func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{2}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{2}
}
func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b)
@@ -428,7 +428,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} }
func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) }
func (*PublicUserInfo) ProtoMessage() {}
func (*PublicUserInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{3}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{3}
}
func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b)
@@ -492,9 +492,15 @@ type UserInfo struct {
Birth uint32 `protobuf:"varint,6,opt,name=birth" json:"birth,omitempty"`
Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"`
Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"`
- CreateTime uint32 `protobuf:"varint,9,opt,name=createTime" json:"createTime,omitempty"`
- AppMangerLevel int32 `protobuf:"varint,10,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"`
- GlobalRecvMsgOpt int32 `protobuf:"varint,11,opt,name=globalRecvMsgOpt" json:"globalRecvMsgOpt,omitempty"`
+ CreateIp string `protobuf:"bytes,9,opt,name=createIp" json:"createIp,omitempty"`
+ CreateTime uint32 `protobuf:"varint,10,opt,name=createTime" json:"createTime,omitempty"`
+ LastLoginIp string `protobuf:"bytes,11,opt,name=LastLoginIp" json:"LastLoginIp,omitempty"`
+ LastLoginTime uint32 `protobuf:"varint,12,opt,name=LastLoginTime" json:"LastLoginTime,omitempty"`
+ LoginTimes int32 `protobuf:"varint,13,opt,name=LoginTimes" json:"LoginTimes,omitempty"`
+ LoginLimit int32 `protobuf:"varint,14,opt,name=LoginLimit" json:"LoginLimit,omitempty"`
+ AppMangerLevel int32 `protobuf:"varint,15,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"`
+ GlobalRecvMsgOpt int32 `protobuf:"varint,16,opt,name=globalRecvMsgOpt" json:"globalRecvMsgOpt,omitempty"`
+ InvitationCode string `protobuf:"bytes,17,opt,name=invitationCode" json:"invitationCode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -504,7 +510,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{4}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{4}
}
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
@@ -580,6 +586,13 @@ func (m *UserInfo) GetEx() string {
return ""
}
+func (m *UserInfo) GetCreateIp() string {
+ if m != nil {
+ return m.CreateIp
+ }
+ return ""
+}
+
func (m *UserInfo) GetCreateTime() uint32 {
if m != nil {
return m.CreateTime
@@ -587,6 +600,34 @@ func (m *UserInfo) GetCreateTime() uint32 {
return 0
}
+func (m *UserInfo) GetLastLoginIp() string {
+ if m != nil {
+ return m.LastLoginIp
+ }
+ return ""
+}
+
+func (m *UserInfo) GetLastLoginTime() uint32 {
+ if m != nil {
+ return m.LastLoginTime
+ }
+ return 0
+}
+
+func (m *UserInfo) GetLoginTimes() int32 {
+ if m != nil {
+ return m.LoginTimes
+ }
+ return 0
+}
+
+func (m *UserInfo) GetLoginLimit() int32 {
+ if m != nil {
+ return m.LoginLimit
+ }
+ return 0
+}
+
func (m *UserInfo) GetAppMangerLevel() int32 {
if m != nil {
return m.AppMangerLevel
@@ -601,6 +642,13 @@ func (m *UserInfo) GetGlobalRecvMsgOpt() int32 {
return 0
}
+func (m *UserInfo) GetInvitationCode() string {
+ if m != nil {
+ return m.InvitationCode
+ }
+ return ""
+}
+
type FriendInfo struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
Remark string `protobuf:"bytes,2,opt,name=remark" json:"remark,omitempty"`
@@ -618,7 +666,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} }
func (m *FriendInfo) String() string { return proto.CompactTextString(m) }
func (*FriendInfo) ProtoMessage() {}
func (*FriendInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{5}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{5}
}
func (m *FriendInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfo.Unmarshal(m, b)
@@ -703,7 +751,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} }
func (m *BlackInfo) String() string { return proto.CompactTextString(m) }
func (*BlackInfo) ProtoMessage() {}
func (*BlackInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{6}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{6}
}
func (m *BlackInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackInfo.Unmarshal(m, b)
@@ -786,7 +834,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} }
func (m *GroupRequest) String() string { return proto.CompactTextString(m) }
func (*GroupRequest) ProtoMessage() {}
func (*GroupRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{7}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{7}
}
func (m *GroupRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupRequest.Unmarshal(m, b)
@@ -908,7 +956,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} }
func (m *FriendRequest) String() string { return proto.CompactTextString(m) }
func (*FriendRequest) ProtoMessage() {}
func (*FriendRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{8}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{8}
}
func (m *FriendRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendRequest.Unmarshal(m, b)
@@ -1053,7 +1101,7 @@ func (m *Department) Reset() { *m = Department{} }
func (m *Department) String() string { return proto.CompactTextString(m) }
func (*Department) ProtoMessage() {}
func (*Department) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{9}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{9}
}
func (m *Department) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Department.Unmarshal(m, b)
@@ -1164,7 +1212,7 @@ func (m *OrganizationUser) Reset() { *m = OrganizationUser{} }
func (m *OrganizationUser) String() string { return proto.CompactTextString(m) }
func (*OrganizationUser) ProtoMessage() {}
func (*OrganizationUser) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{10}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{10}
}
func (m *OrganizationUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrganizationUser.Unmarshal(m, b)
@@ -1278,7 +1326,7 @@ func (m *DepartmentMember) Reset() { *m = DepartmentMember{} }
func (m *DepartmentMember) String() string { return proto.CompactTextString(m) }
func (*DepartmentMember) ProtoMessage() {}
func (*DepartmentMember) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{11}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{11}
}
func (m *DepartmentMember) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DepartmentMember.Unmarshal(m, b)
@@ -1359,7 +1407,7 @@ func (m *UserDepartmentMember) Reset() { *m = UserDepartmentMember{} }
func (m *UserDepartmentMember) String() string { return proto.CompactTextString(m) }
func (*UserDepartmentMember) ProtoMessage() {}
func (*UserDepartmentMember) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{12}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{12}
}
func (m *UserDepartmentMember) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserDepartmentMember.Unmarshal(m, b)
@@ -1405,7 +1453,7 @@ func (m *UserInDepartment) Reset() { *m = UserInDepartment{} }
func (m *UserInDepartment) String() string { return proto.CompactTextString(m) }
func (*UserInDepartment) ProtoMessage() {}
func (*UserInDepartment) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{13}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{13}
}
func (m *UserInDepartment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInDepartment.Unmarshal(m, b)
@@ -1454,7 +1502,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq
func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListReq) ProtoMessage() {}
func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{14}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{14}
}
func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b)
@@ -1513,7 +1561,7 @@ func (m *SeqList) Reset() { *m = SeqList{} }
func (m *SeqList) String() string { return proto.CompactTextString(m) }
func (*SeqList) ProtoMessage() {}
func (*SeqList) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{15}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{15}
}
func (m *SeqList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SeqList.Unmarshal(m, b)
@@ -1551,7 +1599,7 @@ func (m *MsgDataList) Reset() { *m = MsgDataList{} }
func (m *MsgDataList) String() string { return proto.CompactTextString(m) }
func (*MsgDataList) ProtoMessage() {}
func (*MsgDataList) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{16}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{16}
}
func (m *MsgDataList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataList.Unmarshal(m, b)
@@ -1592,7 +1640,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe
func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListResp) ProtoMessage() {}
func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{17}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{17}
}
func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b)
@@ -1653,7 +1701,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{18}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{18}
}
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
@@ -1706,7 +1754,7 @@ func (m *MaxAndMinSeq) Reset() { *m = MaxAndMinSeq{} }
func (m *MaxAndMinSeq) String() string { return proto.CompactTextString(m) }
func (*MaxAndMinSeq) ProtoMessage() {}
func (*MaxAndMinSeq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{19}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{19}
}
func (m *MaxAndMinSeq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MaxAndMinSeq.Unmarshal(m, b)
@@ -1755,7 +1803,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{20}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{20}
}
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
@@ -1823,7 +1871,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} }
func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) }
func (*UserSendMsgResp) ProtoMessage() {}
func (*UserSendMsgResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{21}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{21}
}
func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b)
@@ -1885,6 +1933,8 @@ type MsgData struct {
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,19,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"`
AtUserIDList []string `protobuf:"bytes,20,rep,name=atUserIDList" json:"atUserIDList,omitempty"`
MsgDataList []byte `protobuf:"bytes,21,opt,name=msgDataList,proto3" json:"msgDataList,omitempty"`
+ AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
+ Ex string `protobuf:"bytes,23,opt,name=ex" json:"ex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1894,7 +1944,7 @@ func (m *MsgData) Reset() { *m = MsgData{} }
func (m *MsgData) String() string { return proto.CompactTextString(m) }
func (*MsgData) ProtoMessage() {}
func (*MsgData) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{22}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{22}
}
func (m *MsgData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgData.Unmarshal(m, b)
@@ -2054,6 +2104,20 @@ func (m *MsgData) GetMsgDataList() []byte {
return nil
}
+func (m *MsgData) GetAttachedInfo() string {
+ if m != nil {
+ return m.AttachedInfo
+ }
+ return ""
+}
+
+func (m *MsgData) GetEx() string {
+ if m != nil {
+ return m.Ex
+ }
+ return ""
+}
+
type OfflinePushInfo struct {
Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"`
@@ -2069,7 +2133,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} }
func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) }
func (*OfflinePushInfo) ProtoMessage() {}
func (*OfflinePushInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{23}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{23}
}
func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b)
@@ -2137,7 +2201,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} }
func (m *TipsComm) String() string { return proto.CompactTextString(m) }
func (*TipsComm) ProtoMessage() {}
func (*TipsComm) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{24}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{24}
}
func (m *TipsComm) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TipsComm.Unmarshal(m, b)
@@ -2194,7 +2258,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} }
func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCreatedTips) ProtoMessage() {}
func (*GroupCreatedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{25}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{25}
}
func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b)
@@ -2263,7 +2327,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} }
func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupInfoSetTips) ProtoMessage() {}
func (*GroupInfoSetTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{26}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{26}
}
func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b)
@@ -2318,7 +2382,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi
func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) }
func (*JoinGroupApplicationTips) ProtoMessage() {}
func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{27}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{27}
}
func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b)
@@ -2374,7 +2438,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} }
func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) }
func (*MemberQuitTips) ProtoMessage() {}
func (*MemberQuitTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{28}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{28}
}
func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b)
@@ -2429,7 +2493,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc
func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationAcceptedTips) ProtoMessage() {}
func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{29}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{29}
}
func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b)
@@ -2484,7 +2548,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationRejectedTips) ProtoMessage() {}
func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{30}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{30}
}
func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b)
@@ -2540,7 +2604,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred
func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) }
func (*GroupOwnerTransferredTips) ProtoMessage() {}
func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{31}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{31}
}
func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b)
@@ -2603,7 +2667,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} }
func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) }
func (*MemberKickedTips) ProtoMessage() {}
func (*MemberKickedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{32}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{32}
}
func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b)
@@ -2666,7 +2730,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} }
func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) }
func (*MemberInvitedTips) ProtoMessage() {}
func (*MemberInvitedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{33}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{33}
}
func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b)
@@ -2728,7 +2792,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} }
func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) }
func (*MemberEnterTips) ProtoMessage() {}
func (*MemberEnterTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{34}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{34}
}
func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b)
@@ -2782,7 +2846,7 @@ func (m *GroupDismissedTips) Reset() { *m = GroupDismissedTips{} }
func (m *GroupDismissedTips) String() string { return proto.CompactTextString(m) }
func (*GroupDismissedTips) ProtoMessage() {}
func (*GroupDismissedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{35}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{35}
}
func (m *GroupDismissedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupDismissedTips.Unmarshal(m, b)
@@ -2838,7 +2902,7 @@ func (m *GroupMemberMutedTips) Reset() { *m = GroupMemberMutedTips{} }
func (m *GroupMemberMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberMutedTips) ProtoMessage() {}
func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{36}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{36}
}
func (m *GroupMemberMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberMutedTips.Unmarshal(m, b)
@@ -2907,7 +2971,7 @@ func (m *GroupMemberCancelMutedTips) Reset() { *m = GroupMemberCancelMut
func (m *GroupMemberCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberCancelMutedTips) ProtoMessage() {}
func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{37}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{37}
}
func (m *GroupMemberCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberCancelMutedTips.Unmarshal(m, b)
@@ -2968,7 +3032,7 @@ func (m *GroupMutedTips) Reset() { *m = GroupMutedTips{} }
func (m *GroupMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMutedTips) ProtoMessage() {}
func (*GroupMutedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{38}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{38}
}
func (m *GroupMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMutedTips.Unmarshal(m, b)
@@ -3022,7 +3086,7 @@ func (m *GroupCancelMutedTips) Reset() { *m = GroupCancelMutedTips{} }
func (m *GroupCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCancelMutedTips) ProtoMessage() {}
func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{39}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{39}
}
func (m *GroupCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCancelMutedTips.Unmarshal(m, b)
@@ -3077,7 +3141,7 @@ func (m *GroupMemberInfoSetTips) Reset() { *m = GroupMemberInfoSetTips{}
func (m *GroupMemberInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberInfoSetTips) ProtoMessage() {}
func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{40}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{40}
}
func (m *GroupMemberInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberInfoSetTips.Unmarshal(m, b)
@@ -3137,7 +3201,7 @@ func (m *OrganizationChangedTips) Reset() { *m = OrganizationChangedTips
func (m *OrganizationChangedTips) String() string { return proto.CompactTextString(m) }
func (*OrganizationChangedTips) ProtoMessage() {}
func (*OrganizationChangedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{41}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{41}
}
func (m *OrganizationChangedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrganizationChangedTips.Unmarshal(m, b)
@@ -3184,7 +3248,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} }
func (m *FriendApplication) String() string { return proto.CompactTextString(m) }
func (*FriendApplication) ProtoMessage() {}
func (*FriendApplication) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{42}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{42}
}
func (m *FriendApplication) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplication.Unmarshal(m, b)
@@ -3237,7 +3301,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} }
func (m *FromToUserID) String() string { return proto.CompactTextString(m) }
func (*FromToUserID) ProtoMessage() {}
func (*FromToUserID) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{43}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{43}
}
func (m *FromToUserID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FromToUserID.Unmarshal(m, b)
@@ -3283,7 +3347,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} }
func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationTips) ProtoMessage() {}
func (*FriendApplicationTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{44}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{44}
}
func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b)
@@ -3323,7 +3387,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationApprovedTips) ProtoMessage() {}
func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{45}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{45}
}
func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b)
@@ -3370,7 +3434,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationRejectedTips) ProtoMessage() {}
func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{46}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{46}
}
func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b)
@@ -3418,7 +3482,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} }
func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) }
func (*FriendAddedTips) ProtoMessage() {}
func (*FriendAddedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{47}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{47}
}
func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b)
@@ -3471,7 +3535,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} }
func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) }
func (*FriendDeletedTips) ProtoMessage() {}
func (*FriendDeletedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{48}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{48}
}
func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b)
@@ -3509,7 +3573,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} }
func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) }
func (*BlackAddedTips) ProtoMessage() {}
func (*BlackAddedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{49}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{49}
}
func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b)
@@ -3547,7 +3611,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} }
func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) }
func (*BlackDeletedTips) ProtoMessage() {}
func (*BlackDeletedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{50}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{50}
}
func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b)
@@ -3585,7 +3649,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} }
func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) }
func (*FriendInfoChangedTips) ProtoMessage() {}
func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{51}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{51}
}
func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b)
@@ -3624,7 +3688,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} }
func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) }
func (*UserInfoUpdatedTips) ProtoMessage() {}
func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{52}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{52}
}
func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b)
@@ -3654,6 +3718,7 @@ func (m *UserInfoUpdatedTips) GetUserID() string {
// ////////////////////conversation/////////////////////
type ConversationUpdateTips struct {
UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"`
+ ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList" json:"conversationIDList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -3663,7 +3728,7 @@ func (m *ConversationUpdateTips) Reset() { *m = ConversationUpdateTips{}
func (m *ConversationUpdateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationUpdateTips) ProtoMessage() {}
func (*ConversationUpdateTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{53}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{53}
}
func (m *ConversationUpdateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationUpdateTips.Unmarshal(m, b)
@@ -3690,6 +3755,13 @@ func (m *ConversationUpdateTips) GetUserID() string {
return ""
}
+func (m *ConversationUpdateTips) GetConversationIDList() []string {
+ if m != nil {
+ return m.ConversationIDList
+ }
+ return nil
+}
+
type ConversationSetPrivateTips struct {
RecvID string `protobuf:"bytes,1,opt,name=recvID" json:"recvID,omitempty"`
SendID string `protobuf:"bytes,2,opt,name=sendID" json:"sendID,omitempty"`
@@ -3703,7 +3775,7 @@ func (m *ConversationSetPrivateTips) Reset() { *m = ConversationSetPriva
func (m *ConversationSetPrivateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationSetPrivateTips) ProtoMessage() {}
func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{54}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{54}
}
func (m *ConversationSetPrivateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationSetPrivateTips.Unmarshal(m, b)
@@ -3758,7 +3830,7 @@ func (m *DeleteMessageTips) Reset() { *m = DeleteMessageTips{} }
func (m *DeleteMessageTips) String() string { return proto.CompactTextString(m) }
func (*DeleteMessageTips) ProtoMessage() {}
func (*DeleteMessageTips) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{55}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{55}
}
func (m *DeleteMessageTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteMessageTips.Unmarshal(m, b)
@@ -3812,7 +3884,7 @@ func (m *RequestPagination) Reset() { *m = RequestPagination{} }
func (m *RequestPagination) String() string { return proto.CompactTextString(m) }
func (*RequestPagination) ProtoMessage() {}
func (*RequestPagination) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{56}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{56}
}
func (m *RequestPagination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestPagination.Unmarshal(m, b)
@@ -3858,7 +3930,7 @@ func (m *ResponsePagination) Reset() { *m = ResponsePagination{} }
func (m *ResponsePagination) String() string { return proto.CompactTextString(m) }
func (*ResponsePagination) ProtoMessage() {}
func (*ResponsePagination) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{57}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{57}
}
func (m *ResponsePagination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResponsePagination.Unmarshal(m, b)
@@ -3901,6 +3973,7 @@ type SignalReq struct {
// *SignalReq_Accept
// *SignalReq_HungUp
// *SignalReq_Reject
+ // *SignalReq_GetRoomByGroupID
Payload isSignalReq_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -3911,7 +3984,7 @@ func (m *SignalReq) Reset() { *m = SignalReq{} }
func (m *SignalReq) String() string { return proto.CompactTextString(m) }
func (*SignalReq) ProtoMessage() {}
func (*SignalReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{58}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{58}
}
func (m *SignalReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalReq.Unmarshal(m, b)
@@ -3953,13 +4026,17 @@ type SignalReq_HungUp struct {
type SignalReq_Reject struct {
Reject *SignalRejectReq `protobuf:"bytes,6,opt,name=reject,oneof"`
}
+type SignalReq_GetRoomByGroupID struct {
+ GetRoomByGroupID *SignalGetRoomByGroupIDReq `protobuf:"bytes,7,opt,name=GetRoomByGroupID,oneof"`
+}
-func (*SignalReq_Invite) isSignalReq_Payload() {}
-func (*SignalReq_InviteInGroup) isSignalReq_Payload() {}
-func (*SignalReq_Cancel) isSignalReq_Payload() {}
-func (*SignalReq_Accept) isSignalReq_Payload() {}
-func (*SignalReq_HungUp) isSignalReq_Payload() {}
-func (*SignalReq_Reject) isSignalReq_Payload() {}
+func (*SignalReq_Invite) isSignalReq_Payload() {}
+func (*SignalReq_InviteInGroup) isSignalReq_Payload() {}
+func (*SignalReq_Cancel) isSignalReq_Payload() {}
+func (*SignalReq_Accept) isSignalReq_Payload() {}
+func (*SignalReq_HungUp) isSignalReq_Payload() {}
+func (*SignalReq_Reject) isSignalReq_Payload() {}
+func (*SignalReq_GetRoomByGroupID) isSignalReq_Payload() {}
func (m *SignalReq) GetPayload() isSignalReq_Payload {
if m != nil {
@@ -4010,6 +4087,13 @@ func (m *SignalReq) GetReject() *SignalRejectReq {
return nil
}
+func (m *SignalReq) GetGetRoomByGroupID() *SignalGetRoomByGroupIDReq {
+ if x, ok := m.GetPayload().(*SignalReq_GetRoomByGroupID); ok {
+ return x.GetRoomByGroupID
+ }
+ return nil
+}
+
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SignalReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _SignalReq_OneofMarshaler, _SignalReq_OneofUnmarshaler, _SignalReq_OneofSizer, []interface{}{
@@ -4019,6 +4103,7 @@ func (*SignalReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) err
(*SignalReq_Accept)(nil),
(*SignalReq_HungUp)(nil),
(*SignalReq_Reject)(nil),
+ (*SignalReq_GetRoomByGroupID)(nil),
}
}
@@ -4056,6 +4141,11 @@ func _SignalReq_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
if err := b.EncodeMessage(x.Reject); err != nil {
return err
}
+ case *SignalReq_GetRoomByGroupID:
+ b.EncodeVarint(7<<3 | proto.WireBytes)
+ if err := b.EncodeMessage(x.GetRoomByGroupID); err != nil {
+ return err
+ }
case nil:
default:
return fmt.Errorf("SignalReq.Payload has unexpected type %T", x)
@@ -4114,6 +4204,14 @@ func _SignalReq_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buff
err := b.DecodeMessage(msg)
m.Payload = &SignalReq_Reject{msg}
return true, err
+ case 7: // payload.GetRoomByGroupID
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ msg := new(SignalGetRoomByGroupIDReq)
+ err := b.DecodeMessage(msg)
+ m.Payload = &SignalReq_GetRoomByGroupID{msg}
+ return true, err
default:
return false, nil
}
@@ -4153,6 +4251,11 @@ func _SignalReq_OneofSizer(msg proto.Message) (n int) {
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
+ case *SignalReq_GetRoomByGroupID:
+ s := proto.Size(x.GetRoomByGroupID)
+ n += 1 // tag and wire
+ n += proto.SizeVarint(uint64(s))
+ n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
@@ -4168,6 +4271,7 @@ type SignalResp struct {
// *SignalResp_Accept
// *SignalResp_HungUp
// *SignalResp_Reject
+ // *SignalResp_GetRoomByGroupID
Payload isSignalResp_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -4178,7 +4282,7 @@ func (m *SignalResp) Reset() { *m = SignalResp{} }
func (m *SignalResp) String() string { return proto.CompactTextString(m) }
func (*SignalResp) ProtoMessage() {}
func (*SignalResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{59}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{59}
}
func (m *SignalResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalResp.Unmarshal(m, b)
@@ -4220,13 +4324,17 @@ type SignalResp_HungUp struct {
type SignalResp_Reject struct {
Reject *SignalRejectReply `protobuf:"bytes,6,opt,name=reject,oneof"`
}
+type SignalResp_GetRoomByGroupID struct {
+ GetRoomByGroupID *SignalGetRoomByGroupIDReply `protobuf:"bytes,7,opt,name=GetRoomByGroupID,oneof"`
+}
-func (*SignalResp_Invite) isSignalResp_Payload() {}
-func (*SignalResp_InviteInGroup) isSignalResp_Payload() {}
-func (*SignalResp_Cancel) isSignalResp_Payload() {}
-func (*SignalResp_Accept) isSignalResp_Payload() {}
-func (*SignalResp_HungUp) isSignalResp_Payload() {}
-func (*SignalResp_Reject) isSignalResp_Payload() {}
+func (*SignalResp_Invite) isSignalResp_Payload() {}
+func (*SignalResp_InviteInGroup) isSignalResp_Payload() {}
+func (*SignalResp_Cancel) isSignalResp_Payload() {}
+func (*SignalResp_Accept) isSignalResp_Payload() {}
+func (*SignalResp_HungUp) isSignalResp_Payload() {}
+func (*SignalResp_Reject) isSignalResp_Payload() {}
+func (*SignalResp_GetRoomByGroupID) isSignalResp_Payload() {}
func (m *SignalResp) GetPayload() isSignalResp_Payload {
if m != nil {
@@ -4277,6 +4385,13 @@ func (m *SignalResp) GetReject() *SignalRejectReply {
return nil
}
+func (m *SignalResp) GetGetRoomByGroupID() *SignalGetRoomByGroupIDReply {
+ if x, ok := m.GetPayload().(*SignalResp_GetRoomByGroupID); ok {
+ return x.GetRoomByGroupID
+ }
+ return nil
+}
+
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SignalResp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _SignalResp_OneofMarshaler, _SignalResp_OneofUnmarshaler, _SignalResp_OneofSizer, []interface{}{
@@ -4286,6 +4401,7 @@ func (*SignalResp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) er
(*SignalResp_Accept)(nil),
(*SignalResp_HungUp)(nil),
(*SignalResp_Reject)(nil),
+ (*SignalResp_GetRoomByGroupID)(nil),
}
}
@@ -4323,6 +4439,11 @@ func _SignalResp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
if err := b.EncodeMessage(x.Reject); err != nil {
return err
}
+ case *SignalResp_GetRoomByGroupID:
+ b.EncodeVarint(7<<3 | proto.WireBytes)
+ if err := b.EncodeMessage(x.GetRoomByGroupID); err != nil {
+ return err
+ }
case nil:
default:
return fmt.Errorf("SignalResp.Payload has unexpected type %T", x)
@@ -4381,6 +4502,14 @@ func _SignalResp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buf
err := b.DecodeMessage(msg)
m.Payload = &SignalResp_Reject{msg}
return true, err
+ case 7: // payload.GetRoomByGroupID
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ msg := new(SignalGetRoomByGroupIDReply)
+ err := b.DecodeMessage(msg)
+ m.Payload = &SignalResp_GetRoomByGroupID{msg}
+ return true, err
default:
return false, nil
}
@@ -4420,6 +4549,11 @@ func _SignalResp_OneofSizer(msg proto.Message) (n int) {
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
+ case *SignalResp_GetRoomByGroupID:
+ s := proto.Size(x.GetRoomByGroupID)
+ n += 1 // tag and wire
+ n += proto.SizeVarint(uint64(s))
+ n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
@@ -4447,7 +4581,7 @@ func (m *InvitationInfo) Reset() { *m = InvitationInfo{} }
func (m *InvitationInfo) String() string { return proto.CompactTextString(m) }
func (*InvitationInfo) ProtoMessage() {}
func (*InvitationInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{60}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{60}
}
func (m *InvitationInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InvitationInfo.Unmarshal(m, b)
@@ -4550,7 +4684,7 @@ func (m *ParticipantMetaData) Reset() { *m = ParticipantMetaData{} }
func (m *ParticipantMetaData) String() string { return proto.CompactTextString(m) }
func (*ParticipantMetaData) ProtoMessage() {}
func (*ParticipantMetaData) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{61}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{61}
}
func (m *ParticipantMetaData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParticipantMetaData.Unmarshal(m, b)
@@ -4605,7 +4739,7 @@ func (m *SignalInviteReq) Reset() { *m = SignalInviteReq{} }
func (m *SignalInviteReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReq) ProtoMessage() {}
func (*SignalInviteReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{62}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{62}
}
func (m *SignalInviteReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReq.Unmarshal(m, b)
@@ -4666,7 +4800,7 @@ func (m *SignalInviteReply) Reset() { *m = SignalInviteReply{} }
func (m *SignalInviteReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReply) ProtoMessage() {}
func (*SignalInviteReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{63}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{63}
}
func (m *SignalInviteReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReply.Unmarshal(m, b)
@@ -4721,7 +4855,7 @@ func (m *SignalInviteInGroupReq) Reset() { *m = SignalInviteInGroupReq{}
func (m *SignalInviteInGroupReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReq) ProtoMessage() {}
func (*SignalInviteInGroupReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{64}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{64}
}
func (m *SignalInviteInGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReq.Unmarshal(m, b)
@@ -4782,7 +4916,7 @@ func (m *SignalInviteInGroupReply) Reset() { *m = SignalInviteInGroupRep
func (m *SignalInviteInGroupReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReply) ProtoMessage() {}
func (*SignalInviteInGroupReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{65}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{65}
}
func (m *SignalInviteInGroupReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReply.Unmarshal(m, b)
@@ -4837,7 +4971,7 @@ func (m *SignalCancelReq) Reset() { *m = SignalCancelReq{} }
func (m *SignalCancelReq) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReq) ProtoMessage() {}
func (*SignalCancelReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{66}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{66}
}
func (m *SignalCancelReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReq.Unmarshal(m, b)
@@ -4895,7 +5029,7 @@ func (m *SignalCancelReply) Reset() { *m = SignalCancelReply{} }
func (m *SignalCancelReply) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReply) ProtoMessage() {}
func (*SignalCancelReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{67}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{67}
}
func (m *SignalCancelReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReply.Unmarshal(m, b)
@@ -4930,7 +5064,7 @@ func (m *SignalAcceptReq) Reset() { *m = SignalAcceptReq{} }
func (m *SignalAcceptReq) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReq) ProtoMessage() {}
func (*SignalAcceptReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{68}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{68}
}
func (m *SignalAcceptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReq.Unmarshal(m, b)
@@ -4998,7 +5132,7 @@ func (m *SignalAcceptReply) Reset() { *m = SignalAcceptReply{} }
func (m *SignalAcceptReply) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReply) ProtoMessage() {}
func (*SignalAcceptReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{69}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{69}
}
func (m *SignalAcceptReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReply.Unmarshal(m, b)
@@ -5052,7 +5186,7 @@ func (m *SignalHungUpReq) Reset() { *m = SignalHungUpReq{} }
func (m *SignalHungUpReq) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReq) ProtoMessage() {}
func (*SignalHungUpReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{70}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{70}
}
func (m *SignalHungUpReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReq.Unmarshal(m, b)
@@ -5103,7 +5237,7 @@ func (m *SignalHungUpReply) Reset() { *m = SignalHungUpReply{} }
func (m *SignalHungUpReply) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReply) ProtoMessage() {}
func (*SignalHungUpReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{71}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{71}
}
func (m *SignalHungUpReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReply.Unmarshal(m, b)
@@ -5138,7 +5272,7 @@ func (m *SignalRejectReq) Reset() { *m = SignalRejectReq{} }
func (m *SignalRejectReq) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReq) ProtoMessage() {}
func (*SignalRejectReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{72}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{72}
}
func (m *SignalRejectReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReq.Unmarshal(m, b)
@@ -5203,7 +5337,7 @@ func (m *SignalRejectReply) Reset() { *m = SignalRejectReply{} }
func (m *SignalRejectReply) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReply) ProtoMessage() {}
func (*SignalRejectReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{73}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{73}
}
func (m *SignalRejectReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReply.Unmarshal(m, b)
@@ -5223,6 +5357,122 @@ func (m *SignalRejectReply) XXX_DiscardUnknown() {
var xxx_messageInfo_SignalRejectReply proto.InternalMessageInfo
+type SignalGetRoomByGroupIDReq struct {
+ OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"`
+ GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SignalGetRoomByGroupIDReq) Reset() { *m = SignalGetRoomByGroupIDReq{} }
+func (m *SignalGetRoomByGroupIDReq) String() string { return proto.CompactTextString(m) }
+func (*SignalGetRoomByGroupIDReq) ProtoMessage() {}
+func (*SignalGetRoomByGroupIDReq) Descriptor() ([]byte, []int) {
+ return fileDescriptor_ws_9506eea4334b9b75, []int{74}
+}
+func (m *SignalGetRoomByGroupIDReq) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReq.Unmarshal(m, b)
+}
+func (m *SignalGetRoomByGroupIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReq.Marshal(b, m, deterministic)
+}
+func (dst *SignalGetRoomByGroupIDReq) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SignalGetRoomByGroupIDReq.Merge(dst, src)
+}
+func (m *SignalGetRoomByGroupIDReq) XXX_Size() int {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReq.Size(m)
+}
+func (m *SignalGetRoomByGroupIDReq) XXX_DiscardUnknown() {
+ xxx_messageInfo_SignalGetRoomByGroupIDReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SignalGetRoomByGroupIDReq proto.InternalMessageInfo
+
+func (m *SignalGetRoomByGroupIDReq) GetOpUserID() string {
+ if m != nil {
+ return m.OpUserID
+ }
+ return ""
+}
+
+func (m *SignalGetRoomByGroupIDReq) GetGroupID() string {
+ if m != nil {
+ return m.GroupID
+ }
+ return ""
+}
+
+type SignalGetRoomByGroupIDReply struct {
+ Invitation *InvitationInfo `protobuf:"bytes,1,opt,name=invitation" json:"invitation,omitempty"`
+ OnConnectingUserIDList []string `protobuf:"bytes,2,rep,name=onConnectingUserIDList" json:"onConnectingUserIDList,omitempty"`
+ Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"`
+ RoomID string `protobuf:"bytes,4,opt,name=roomID" json:"roomID,omitempty"`
+ LiveURL string `protobuf:"bytes,5,opt,name=liveURL" json:"liveURL,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SignalGetRoomByGroupIDReply) Reset() { *m = SignalGetRoomByGroupIDReply{} }
+func (m *SignalGetRoomByGroupIDReply) String() string { return proto.CompactTextString(m) }
+func (*SignalGetRoomByGroupIDReply) ProtoMessage() {}
+func (*SignalGetRoomByGroupIDReply) Descriptor() ([]byte, []int) {
+ return fileDescriptor_ws_9506eea4334b9b75, []int{75}
+}
+func (m *SignalGetRoomByGroupIDReply) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReply.Unmarshal(m, b)
+}
+func (m *SignalGetRoomByGroupIDReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReply.Marshal(b, m, deterministic)
+}
+func (dst *SignalGetRoomByGroupIDReply) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SignalGetRoomByGroupIDReply.Merge(dst, src)
+}
+func (m *SignalGetRoomByGroupIDReply) XXX_Size() int {
+ return xxx_messageInfo_SignalGetRoomByGroupIDReply.Size(m)
+}
+func (m *SignalGetRoomByGroupIDReply) XXX_DiscardUnknown() {
+ xxx_messageInfo_SignalGetRoomByGroupIDReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SignalGetRoomByGroupIDReply proto.InternalMessageInfo
+
+func (m *SignalGetRoomByGroupIDReply) GetInvitation() *InvitationInfo {
+ if m != nil {
+ return m.Invitation
+ }
+ return nil
+}
+
+func (m *SignalGetRoomByGroupIDReply) GetOnConnectingUserIDList() []string {
+ if m != nil {
+ return m.OnConnectingUserIDList
+ }
+ return nil
+}
+
+func (m *SignalGetRoomByGroupIDReply) GetToken() string {
+ if m != nil {
+ return m.Token
+ }
+ return ""
+}
+
+func (m *SignalGetRoomByGroupIDReply) GetRoomID() string {
+ if m != nil {
+ return m.RoomID
+ }
+ return ""
+}
+
+func (m *SignalGetRoomByGroupIDReply) GetLiveURL() string {
+ if m != nil {
+ return m.LiveURL
+ }
+ return ""
+}
+
type DelMsgListReq struct {
OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
@@ -5237,7 +5487,7 @@ func (m *DelMsgListReq) Reset() { *m = DelMsgListReq{} }
func (m *DelMsgListReq) String() string { return proto.CompactTextString(m) }
func (*DelMsgListReq) ProtoMessage() {}
func (*DelMsgListReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{74}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{76}
}
func (m *DelMsgListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListReq.Unmarshal(m, b)
@@ -5297,7 +5547,7 @@ func (m *DelMsgListResp) Reset() { *m = DelMsgListResp{} }
func (m *DelMsgListResp) String() string { return proto.CompactTextString(m) }
func (*DelMsgListResp) ProtoMessage() {}
func (*DelMsgListResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_ws_63960bbd3e4ca6d2, []int{75}
+ return fileDescriptor_ws_9506eea4334b9b75, []int{77}
}
func (m *DelMsgListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListResp.Unmarshal(m, b)
@@ -5410,230 +5660,245 @@ func init() {
proto.RegisterType((*SignalHungUpReply)(nil), "server_api_params.SignalHungUpReply")
proto.RegisterType((*SignalRejectReq)(nil), "server_api_params.SignalRejectReq")
proto.RegisterType((*SignalRejectReply)(nil), "server_api_params.SignalRejectReply")
+ proto.RegisterType((*SignalGetRoomByGroupIDReq)(nil), "server_api_params.SignalGetRoomByGroupIDReq")
+ proto.RegisterType((*SignalGetRoomByGroupIDReply)(nil), "server_api_params.SignalGetRoomByGroupIDReply")
proto.RegisterType((*DelMsgListReq)(nil), "server_api_params.DelMsgListReq")
proto.RegisterType((*DelMsgListResp)(nil), "server_api_params.DelMsgListResp")
}
-func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_63960bbd3e4ca6d2) }
+func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_9506eea4334b9b75) }
-var fileDescriptor_ws_63960bbd3e4ca6d2 = []byte{
- // 3479 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0xcd, 0x6f, 0x24, 0x47,
- 0xf5, 0xbf, 0xee, 0xf1, 0x8c, 0x3d, 0x6f, 0xfc, 0x31, 0xee, 0xdd, 0x38, 0xf3, 0x33, 0x9b, 0xc5,
- 0x74, 0xac, 0x24, 0x2c, 0xc1, 0x1b, 0x6d, 0x08, 0x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19, 0x50, 0x3d, 0x00, 0x00,
+var fileDescriptor_ws_9506eea4334b9b75 = []byte{
+ // 3681 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5c, 0xcd, 0x6f, 0x1c, 0xc7,
+ 0xb1, 0x7f, 0x33, 0xfb, 0x41, 0x6e, 0x2d, 0x3f, 0x96, 0x23, 0x99, 0x5e, 0xd3, 0xb2, 0x1e, 0xdf,
+ 0x58, 0xb0, 0xfd, 0xf4, 0xfc, 0xa8, 0x07, 0xf9, 0xd9, 0x78, 0xcf, 0x1f, 0x0a, 0x44, 0xd2, 0xa2,
+ 0x68, 0x93, 0x22, 0x3d, 0x2b, 0xd9, 0x81, 0x6d, 0x40, 0x1e, 0xee, 0x34, 0x97, 0x63, 0xce, 0x4e,
+ 0x0f, 0xe7, 0x83, 0x12, 0x73, 0x09, 0x90, 0x00, 0x41, 0x90, 0x43, 0x72, 0x49, 0x10, 0x20, 0xc7,
+ 0x5c, 0x82, 0x04, 0x81, 0x11, 0x04, 0x49, 0x90, 0x43, 0x10, 0xe4, 0x90, 0x5b, 0x2e, 0x39, 0xe4,
+ 0x96, 0x43, 0x82, 0x9c, 0xf3, 0x0f, 0x04, 0x09, 0xe0, 0xa0, 0xbb, 0x7a, 0x66, 0xba, 0x67, 0x66,
+ 0xc9, 0x15, 0x41, 0x58, 0x32, 0x94, 0x1b, 0xab, 0xa6, 0xab, 0xba, 0xba, 0xea, 0xd7, 0xd5, 0xd5,
+ 0x1f, 0x4b, 0x98, 0x8d, 0x9c, 0xfd, 0xbb, 0xf7, 0xa2, 0x2b, 0xf7, 0xa2, 0xa5, 0x20, 0xa4, 0x31,
+ 0x35, 0xe6, 0x22, 0x12, 0x1e, 0x92, 0xf0, 0xae, 0x1d, 0xb8, 0x77, 0x03, 0x3b, 0xb4, 0x87, 0xd1,
+ 0xc2, 0xf3, 0x5b, 0x01, 0xf1, 0xef,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c,
+ 0x8e, 0x75, 0xaa, 0x54, 0xa1, 0xe9, 0x4a, 0x85, 0x66, 0xfe, 0x59, 0x83, 0xa7, 0x8f, 0xa9, 0x40,
+ 0x0b, 0xe1, 0xd0, 0x4e, 0x13, 0x8e, 0x57, 0x60, 0x9e, 0xfa, 0x2b, 0xd4, 0xf7, 0x49, 0x3f, 0x76,
+ 0xfd, 0x41, 0xa9, 0xe2, 0x1c, 0xf1, 0x35, 0x9f, 0x57, 0xb5, 0xea, 0x79, 0x55, 0x1f, 0x35, 0xaf,
+ 0x1a, 0xea, 0xbc, 0xfa, 0x32, 0x4c, 0xaf, 0x12, 0x6f, 0x33, 0x1a, 0xa4, 0x6f, 0xa2, 0xcf, 0xf4,
+ 0xf0, 0xa0, 0xf8, 0x72, 0xb4, 0x5e, 0x7e, 0x39, 0xba, 0x0c, 0x33, 0xb2, 0x01, 0xa7, 0x79, 0xf3,
+ 0xbb, 0x7c, 0xe1, 0xfd, 0x85, 0x25, 0xf1, 0x7f, 0x01, 0x5e, 0x2b, 0x79, 0x7f, 0xa7, 0xc9, 0x7f,
+ 0x49, 0xfc, 0xd2, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x80, 0x2b, 0x62, 0xc9, 0x70, 0x40, 0x00,
+ 0x00,
}
diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto
index 9783c2bd7..226ac5dcf 100644
--- a/pkg/proto/sdk_ws/ws.proto
+++ b/pkg/proto/sdk_ws/ws.proto
@@ -72,9 +72,15 @@ message UserInfo{
uint32 birth = 6;
string email = 7;
string ex = 8;
- uint32 createTime = 9;
- int32 appMangerLevel = 10;
- int32 globalRecvMsgOpt = 11;
+ string createIp = 9;
+ uint32 createTime = 10;
+ string LastLoginIp =11;
+ uint32 LastLoginTime = 12;
+ int32 LoginTimes = 13;
+ int32 LoginLimit = 14;
+ int32 appMangerLevel = 15;
+ int32 globalRecvMsgOpt = 16;
+ string invitationCode = 17;
}
message FriendInfo{
@@ -262,6 +268,8 @@ message MsgData {
OfflinePushInfo offlinePushInfo = 19;
repeated string atUserIDList = 20;
bytes msgDataList = 21;
+ string attachedInfo = 22;
+ string ex = 23;
}
message OfflinePushInfo{
@@ -485,6 +493,7 @@ message UserInfoUpdatedTips{
//////////////////////conversation/////////////////////
message ConversationUpdateTips{
string UserID = 1;
+ repeated string conversationIDList = 2;
}
message ConversationSetPrivateTips{
@@ -520,6 +529,7 @@ message SignalReq {
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
+ SignalGetRoomByGroupIDReq GetRoomByGroupID = 7;
}
}
@@ -531,6 +541,7 @@ message SignalResp {
SignalAcceptReply accept = 4;
SignalHungUpReply hungUp = 5;
SignalRejectReply reject = 6;
+ SignalGetRoomByGroupIDReply GetRoomByGroupID = 7;
}
}
@@ -628,6 +639,19 @@ message SignalRejectReply {
}
+message SignalGetRoomByGroupIDReq {
+ string opUserID = 1;
+ string groupID = 2;
+}
+
+message SignalGetRoomByGroupIDReply {
+ InvitationInfo invitation = 1;
+ repeated string onConnectingUserIDList = 2;
+ string token = 3;
+ string roomID = 4;
+ string liveURL = 5;
+}
+
message DelMsgListReq{
string opUserID = 1;
diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go
index 41e69b7f9..dc064a136 100644
--- a/pkg/proto/user/user.pb.go
+++ b/pkg/proto/user/user.pb.go
@@ -6,6 +6,7 @@ package user // import "./user"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
+import conversation "Open_IM/pkg/proto/conversation"
import sdk_ws "Open_IM/pkg/proto/sdk_ws"
import (
@@ -36,7 +37,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{0}
+ return fileDescriptor_user_862a17c60dc96c16, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
@@ -83,7 +84,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} }
func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) }
func (*DeleteUsersReq) ProtoMessage() {}
func (*DeleteUsersReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{1}
+ return fileDescriptor_user_862a17c60dc96c16, []int{1}
}
func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b)
@@ -136,7 +137,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} }
func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) }
func (*DeleteUsersResp) ProtoMessage() {}
func (*DeleteUsersResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{2}
+ return fileDescriptor_user_862a17c60dc96c16, []int{2}
}
func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b)
@@ -182,7 +183,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} }
func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDReq) ProtoMessage() {}
func (*GetAllUserIDReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{3}
+ return fileDescriptor_user_862a17c60dc96c16, []int{3}
}
func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b)
@@ -228,7 +229,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} }
func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDResp) ProtoMessage() {}
func (*GetAllUserIDResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{4}
+ return fileDescriptor_user_862a17c60dc96c16, []int{4}
}
func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b)
@@ -275,7 +276,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} }
func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) }
func (*AccountCheckReq) ProtoMessage() {}
func (*AccountCheckReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{5}
+ return fileDescriptor_user_862a17c60dc96c16, []int{5}
}
func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b)
@@ -328,7 +329,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} }
func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) }
func (*AccountCheckResp) ProtoMessage() {}
func (*AccountCheckResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{6}
+ return fileDescriptor_user_862a17c60dc96c16, []int{6}
}
func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b)
@@ -374,7 +375,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR
func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) }
func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {}
func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{6, 0}
+ return fileDescriptor_user_862a17c60dc96c16, []int{6, 0}
}
func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b)
@@ -421,7 +422,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} }
func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetUserInfoReq) ProtoMessage() {}
func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{7}
+ return fileDescriptor_user_862a17c60dc96c16, []int{7}
}
func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b)
@@ -474,7 +475,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} }
func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetUserInfoResp) ProtoMessage() {}
func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{8}
+ return fileDescriptor_user_862a17c60dc96c16, []int{8}
}
func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b)
@@ -521,7 +522,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} }
func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoReq) ProtoMessage() {}
func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{9}
+ return fileDescriptor_user_862a17c60dc96c16, []int{9}
}
func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b)
@@ -573,7 +574,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} }
func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoResp) ProtoMessage() {}
func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{10}
+ return fileDescriptor_user_862a17c60dc96c16, []int{10}
}
func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b)
@@ -613,7 +614,7 @@ func (m *SetGlobalRecvMessageOptReq) Reset() { *m = SetGlobalRecvMessage
func (m *SetGlobalRecvMessageOptReq) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptReq) ProtoMessage() {}
func (*SetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{11}
+ return fileDescriptor_user_862a17c60dc96c16, []int{11}
}
func (m *SetGlobalRecvMessageOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptReq.Unmarshal(m, b)
@@ -665,7 +666,7 @@ func (m *SetGlobalRecvMessageOptResp) Reset() { *m = SetGlobalRecvMessag
func (m *SetGlobalRecvMessageOptResp) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptResp) ProtoMessage() {}
func (*SetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{12}
+ return fileDescriptor_user_862a17c60dc96c16, []int{12}
}
func (m *SetGlobalRecvMessageOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptResp.Unmarshal(m, b)
@@ -692,162 +693,20 @@ func (m *SetGlobalRecvMessageOptResp) GetCommonResp() *CommonResp {
return nil
}
-type Conversation struct {
- OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
- ConversationID string `protobuf:"bytes,2,opt,name=ConversationID" json:"ConversationID,omitempty"`
- RecvMsgOpt int32 `protobuf:"varint,3,opt,name=RecvMsgOpt" json:"RecvMsgOpt,omitempty"`
- ConversationType int32 `protobuf:"varint,4,opt,name=ConversationType" json:"ConversationType,omitempty"`
- UserID string `protobuf:"bytes,5,opt,name=UserID" json:"UserID,omitempty"`
- GroupID string `protobuf:"bytes,6,opt,name=GroupID" json:"GroupID,omitempty"`
- UnreadCount int32 `protobuf:"varint,7,opt,name=UnreadCount" json:"UnreadCount,omitempty"`
- DraftTextTime int64 `protobuf:"varint,8,opt,name=DraftTextTime" json:"DraftTextTime,omitempty"`
- IsPinned bool `protobuf:"varint,9,opt,name=IsPinned" json:"IsPinned,omitempty"`
- AttachedInfo string `protobuf:"bytes,10,opt,name=AttachedInfo" json:"AttachedInfo,omitempty"`
- IsPrivateChat bool `protobuf:"varint,11,opt,name=IsPrivateChat" json:"IsPrivateChat,omitempty"`
- GroupAtType int32 `protobuf:"varint,12,opt,name=GroupAtType" json:"GroupAtType,omitempty"`
- IsNotInGroup bool `protobuf:"varint,13,opt,name=IsNotInGroup" json:"IsNotInGroup,omitempty"`
- Ex string `protobuf:"bytes,14,opt,name=Ex" json:"Ex,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Conversation) Reset() { *m = Conversation{} }
-func (m *Conversation) String() string { return proto.CompactTextString(m) }
-func (*Conversation) ProtoMessage() {}
-func (*Conversation) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{13}
-}
-func (m *Conversation) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Conversation.Unmarshal(m, b)
-}
-func (m *Conversation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Conversation.Marshal(b, m, deterministic)
-}
-func (dst *Conversation) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Conversation.Merge(dst, src)
-}
-func (m *Conversation) XXX_Size() int {
- return xxx_messageInfo_Conversation.Size(m)
-}
-func (m *Conversation) XXX_DiscardUnknown() {
- xxx_messageInfo_Conversation.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Conversation proto.InternalMessageInfo
-
-func (m *Conversation) GetOwnerUserID() string {
- if m != nil {
- return m.OwnerUserID
- }
- return ""
-}
-
-func (m *Conversation) GetConversationID() string {
- if m != nil {
- return m.ConversationID
- }
- return ""
-}
-
-func (m *Conversation) GetRecvMsgOpt() int32 {
- if m != nil {
- return m.RecvMsgOpt
- }
- return 0
-}
-
-func (m *Conversation) GetConversationType() int32 {
- if m != nil {
- return m.ConversationType
- }
- return 0
-}
-
-func (m *Conversation) GetUserID() string {
- if m != nil {
- return m.UserID
- }
- return ""
-}
-
-func (m *Conversation) GetGroupID() string {
- if m != nil {
- return m.GroupID
- }
- return ""
-}
-
-func (m *Conversation) GetUnreadCount() int32 {
- if m != nil {
- return m.UnreadCount
- }
- return 0
-}
-
-func (m *Conversation) GetDraftTextTime() int64 {
- if m != nil {
- return m.DraftTextTime
- }
- return 0
-}
-
-func (m *Conversation) GetIsPinned() bool {
- if m != nil {
- return m.IsPinned
- }
- return false
-}
-
-func (m *Conversation) GetAttachedInfo() string {
- if m != nil {
- return m.AttachedInfo
- }
- return ""
-}
-
-func (m *Conversation) GetIsPrivateChat() bool {
- if m != nil {
- return m.IsPrivateChat
- }
- return false
-}
-
-func (m *Conversation) GetGroupAtType() int32 {
- if m != nil {
- return m.GroupAtType
- }
- return 0
-}
-
-func (m *Conversation) GetIsNotInGroup() bool {
- if m != nil {
- return m.IsNotInGroup
- }
- return false
-}
-
-func (m *Conversation) GetEx() string {
- if m != nil {
- return m.Ex
- }
- return ""
-}
-
type SetConversationReq struct {
- Conversation *Conversation `protobuf:"bytes,1,opt,name=Conversation" json:"Conversation,omitempty"`
- NotificationType int32 `protobuf:"varint,2,opt,name=notificationType" json:"notificationType,omitempty"`
- OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=Conversation" json:"Conversation,omitempty"`
+ NotificationType int32 `protobuf:"varint,2,opt,name=notificationType" json:"notificationType,omitempty"`
+ OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *SetConversationReq) Reset() { *m = SetConversationReq{} }
func (m *SetConversationReq) String() string { return proto.CompactTextString(m) }
func (*SetConversationReq) ProtoMessage() {}
func (*SetConversationReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{14}
+ return fileDescriptor_user_862a17c60dc96c16, []int{13}
}
func (m *SetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationReq.Unmarshal(m, b)
@@ -867,7 +726,7 @@ func (m *SetConversationReq) XXX_DiscardUnknown() {
var xxx_messageInfo_SetConversationReq proto.InternalMessageInfo
-func (m *SetConversationReq) GetConversation() *Conversation {
+func (m *SetConversationReq) GetConversation() *conversation.Conversation {
if m != nil {
return m.Conversation
}
@@ -899,7 +758,7 @@ func (m *SetConversationResp) Reset() { *m = SetConversationResp{} }
func (m *SetConversationResp) String() string { return proto.CompactTextString(m) }
func (*SetConversationResp) ProtoMessage() {}
func (*SetConversationResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{15}
+ return fileDescriptor_user_862a17c60dc96c16, []int{14}
}
func (m *SetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationResp.Unmarshal(m, b)
@@ -941,7 +800,7 @@ func (m *SetRecvMsgOptReq) Reset() { *m = SetRecvMsgOptReq{} }
func (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptReq) ProtoMessage() {}
func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{16}
+ return fileDescriptor_user_862a17c60dc96c16, []int{15}
}
func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b)
@@ -1007,7 +866,7 @@ func (m *SetRecvMsgOptResp) Reset() { *m = SetRecvMsgOptResp{} }
func (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptResp) ProtoMessage() {}
func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{17}
+ return fileDescriptor_user_862a17c60dc96c16, []int{16}
}
func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b)
@@ -1047,7 +906,7 @@ func (m *GetConversationReq) Reset() { *m = GetConversationReq{} }
func (m *GetConversationReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationReq) ProtoMessage() {}
func (*GetConversationReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{18}
+ return fileDescriptor_user_862a17c60dc96c16, []int{17}
}
func (m *GetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationReq.Unmarshal(m, b)
@@ -1089,18 +948,18 @@ func (m *GetConversationReq) GetOperationID() string {
}
type GetConversationResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
- Conversation *Conversation `protobuf:"bytes,2,opt,name=Conversation" json:"Conversation,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
+ Conversation *conversation.Conversation `protobuf:"bytes,2,opt,name=Conversation" json:"Conversation,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *GetConversationResp) Reset() { *m = GetConversationResp{} }
func (m *GetConversationResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationResp) ProtoMessage() {}
func (*GetConversationResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{19}
+ return fileDescriptor_user_862a17c60dc96c16, []int{18}
}
func (m *GetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationResp.Unmarshal(m, b)
@@ -1127,7 +986,7 @@ func (m *GetConversationResp) GetCommonResp() *CommonResp {
return nil
}
-func (m *GetConversationResp) GetConversation() *Conversation {
+func (m *GetConversationResp) GetConversation() *conversation.Conversation {
if m != nil {
return m.Conversation
}
@@ -1147,7 +1006,7 @@ func (m *GetConversationsReq) Reset() { *m = GetConversationsReq{} }
func (m *GetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationsReq) ProtoMessage() {}
func (*GetConversationsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{20}
+ return fileDescriptor_user_862a17c60dc96c16, []int{19}
}
func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b)
@@ -1189,18 +1048,18 @@ func (m *GetConversationsReq) GetOperationID() string {
}
type GetConversationsResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
- Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
+ Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *GetConversationsResp) Reset() { *m = GetConversationsResp{} }
func (m *GetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationsResp) ProtoMessage() {}
func (*GetConversationsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{21}
+ return fileDescriptor_user_862a17c60dc96c16, []int{20}
}
func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b)
@@ -1227,7 +1086,7 @@ func (m *GetConversationsResp) GetCommonResp() *CommonResp {
return nil
}
-func (m *GetConversationsResp) GetConversations() []*Conversation {
+func (m *GetConversationsResp) GetConversations() []*conversation.Conversation {
if m != nil {
return m.Conversations
}
@@ -1246,7 +1105,7 @@ func (m *GetAllConversationsReq) Reset() { *m = GetAllConversationsReq{}
func (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsReq) ProtoMessage() {}
func (*GetAllConversationsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{22}
+ return fileDescriptor_user_862a17c60dc96c16, []int{21}
}
func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b)
@@ -1281,18 +1140,18 @@ func (m *GetAllConversationsReq) GetOperationID() string {
}
type GetAllConversationsResp struct {
- CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
- Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
+ Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *GetAllConversationsResp) Reset() { *m = GetAllConversationsResp{} }
func (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsResp) ProtoMessage() {}
func (*GetAllConversationsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{23}
+ return fileDescriptor_user_862a17c60dc96c16, []int{22}
}
func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b)
@@ -1319,7 +1178,7 @@ func (m *GetAllConversationsResp) GetCommonResp() *CommonResp {
return nil
}
-func (m *GetAllConversationsResp) GetConversations() []*Conversation {
+func (m *GetAllConversationsResp) GetConversations() []*conversation.Conversation {
if m != nil {
return m.Conversations
}
@@ -1327,20 +1186,20 @@ func (m *GetAllConversationsResp) GetConversations() []*Conversation {
}
type BatchSetConversationsReq struct {
- Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations" json:"Conversations,omitempty"`
- OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
- NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"`
- OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=Conversations" json:"Conversations,omitempty"`
+ OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
+ NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"`
+ OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *BatchSetConversationsReq) Reset() { *m = BatchSetConversationsReq{} }
func (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsReq) ProtoMessage() {}
func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{24}
+ return fileDescriptor_user_862a17c60dc96c16, []int{23}
}
func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b)
@@ -1360,7 +1219,7 @@ func (m *BatchSetConversationsReq) XXX_DiscardUnknown() {
var xxx_messageInfo_BatchSetConversationsReq proto.InternalMessageInfo
-func (m *BatchSetConversationsReq) GetConversations() []*Conversation {
+func (m *BatchSetConversationsReq) GetConversations() []*conversation.Conversation {
if m != nil {
return m.Conversations
}
@@ -1401,7 +1260,7 @@ func (m *BatchSetConversationsResp) Reset() { *m = BatchSetConversations
func (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsResp) ProtoMessage() {}
func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{25}
+ return fileDescriptor_user_862a17c60dc96c16, []int{24}
}
func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b)
@@ -1454,7 +1313,7 @@ func (m *ResignUserReq) Reset() { *m = ResignUserReq{} }
func (m *ResignUserReq) String() string { return proto.CompactTextString(m) }
func (*ResignUserReq) ProtoMessage() {}
func (*ResignUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{26}
+ return fileDescriptor_user_862a17c60dc96c16, []int{25}
}
func (m *ResignUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResignUserReq.Unmarshal(m, b)
@@ -1499,7 +1358,7 @@ func (m *ResignUserResp) Reset() { *m = ResignUserResp{} }
func (m *ResignUserResp) String() string { return proto.CompactTextString(m) }
func (*ResignUserResp) ProtoMessage() {}
func (*ResignUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{27}
+ return fileDescriptor_user_862a17c60dc96c16, []int{26}
}
func (m *ResignUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResignUserResp.Unmarshal(m, b)
@@ -1538,7 +1397,7 @@ func (m *GetUserByIdReq) Reset() { *m = GetUserByIdReq{} }
func (m *GetUserByIdReq) String() string { return proto.CompactTextString(m) }
func (*GetUserByIdReq) ProtoMessage() {}
func (*GetUserByIdReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{28}
+ return fileDescriptor_user_862a17c60dc96c16, []int{27}
}
func (m *GetUserByIdReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserByIdReq.Unmarshal(m, b)
@@ -1577,7 +1436,17 @@ type User struct {
Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"`
UserId string `protobuf:"bytes,3,opt,name=UserId" json:"UserId,omitempty"`
CreateTime string `protobuf:"bytes,4,opt,name=CreateTime" json:"CreateTime,omitempty"`
- IsBlock bool `protobuf:"varint,5,opt,name=IsBlock" json:"IsBlock,omitempty"`
+ PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"`
+ Email string `protobuf:"bytes,6,opt,name=Email" json:"Email,omitempty"`
+ Birth string `protobuf:"bytes,7,opt,name=Birth" json:"Birth,omitempty"`
+ CreateIp string `protobuf:"bytes,8,opt,name=CreateIp" json:"CreateIp,omitempty"`
+ LastLoginTime string `protobuf:"bytes,9,opt,name=LastLoginTime" json:"LastLoginTime,omitempty"`
+ LastLoginIp string `protobuf:"bytes,10,opt,name=LastLoginIp" json:"LastLoginIp,omitempty"`
+ LoginTimes int32 `protobuf:"varint,11,opt,name=LoginTimes" json:"LoginTimes,omitempty"`
+ Gender int32 `protobuf:"varint,12,opt,name=Gender" json:"Gender,omitempty"`
+ LoginLimit int32 `protobuf:"varint,13,opt,name=LoginLimit" json:"LoginLimit,omitempty"`
+ IsBlock bool `protobuf:"varint,14,opt,name=IsBlock" json:"IsBlock,omitempty"`
+ RegisterIp string `protobuf:"bytes,15,opt,name=RegisterIp" json:"RegisterIp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1587,7 +1456,7 @@ func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{29}
+ return fileDescriptor_user_862a17c60dc96c16, []int{28}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
@@ -1635,6 +1504,69 @@ func (m *User) GetCreateTime() string {
return ""
}
+func (m *User) GetPhoneNumber() string {
+ if m != nil {
+ return m.PhoneNumber
+ }
+ return ""
+}
+
+func (m *User) GetEmail() string {
+ if m != nil {
+ return m.Email
+ }
+ return ""
+}
+
+func (m *User) GetBirth() string {
+ if m != nil {
+ return m.Birth
+ }
+ return ""
+}
+
+func (m *User) GetCreateIp() string {
+ if m != nil {
+ return m.CreateIp
+ }
+ return ""
+}
+
+func (m *User) GetLastLoginTime() string {
+ if m != nil {
+ return m.LastLoginTime
+ }
+ return ""
+}
+
+func (m *User) GetLastLoginIp() string {
+ if m != nil {
+ return m.LastLoginIp
+ }
+ return ""
+}
+
+func (m *User) GetLoginTimes() int32 {
+ if m != nil {
+ return m.LoginTimes
+ }
+ return 0
+}
+
+func (m *User) GetGender() int32 {
+ if m != nil {
+ return m.Gender
+ }
+ return 0
+}
+
+func (m *User) GetLoginLimit() int32 {
+ if m != nil {
+ return m.LoginLimit
+ }
+ return 0
+}
+
func (m *User) GetIsBlock() bool {
if m != nil {
return m.IsBlock
@@ -1642,6 +1574,13 @@ func (m *User) GetIsBlock() bool {
return false
}
+func (m *User) GetRegisterIp() string {
+ if m != nil {
+ return m.RegisterIp
+ }
+ return ""
+}
+
type GetUserByIdResp struct {
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
@@ -1654,7 +1593,7 @@ func (m *GetUserByIdResp) Reset() { *m = GetUserByIdResp{} }
func (m *GetUserByIdResp) String() string { return proto.CompactTextString(m) }
func (*GetUserByIdResp) ProtoMessage() {}
func (*GetUserByIdResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{30}
+ return fileDescriptor_user_862a17c60dc96c16, []int{29}
}
func (m *GetUserByIdResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserByIdResp.Unmarshal(m, b)
@@ -1701,7 +1640,7 @@ func (m *GetUsersByNameReq) Reset() { *m = GetUsersByNameReq{} }
func (m *GetUsersByNameReq) String() string { return proto.CompactTextString(m) }
func (*GetUsersByNameReq) ProtoMessage() {}
func (*GetUsersByNameReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{31}
+ return fileDescriptor_user_862a17c60dc96c16, []int{30}
}
func (m *GetUsersByNameReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersByNameReq.Unmarshal(m, b)
@@ -1755,7 +1694,7 @@ func (m *GetUsersByNameResp) Reset() { *m = GetUsersByNameResp{} }
func (m *GetUsersByNameResp) String() string { return proto.CompactTextString(m) }
func (*GetUsersByNameResp) ProtoMessage() {}
func (*GetUsersByNameResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{32}
+ return fileDescriptor_user_862a17c60dc96c16, []int{31}
}
func (m *GetUsersByNameResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersByNameResp.Unmarshal(m, b)
@@ -1799,10 +1738,13 @@ func (m *GetUsersByNameResp) GetUserNums() int32 {
type AlterUserReq struct {
UserId string `protobuf:"bytes,1,opt,name=UserId" json:"UserId,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
- PhoneNumber int64 `protobuf:"varint,3,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"`
+ PhoneNumber string `protobuf:"bytes,3,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"`
Nickname string `protobuf:"bytes,4,opt,name=Nickname" json:"Nickname,omitempty"`
Email string `protobuf:"bytes,5,opt,name=Email" json:"Email,omitempty"`
- OpUserId string `protobuf:"bytes,6,opt,name=OpUserId" json:"OpUserId,omitempty"`
+ Gender string `protobuf:"bytes,6,opt,name=Gender" json:"Gender,omitempty"`
+ Birth string `protobuf:"bytes,7,opt,name=Birth" json:"Birth,omitempty"`
+ Photo string `protobuf:"bytes,8,opt,name=Photo" json:"Photo,omitempty"`
+ OpUserId string `protobuf:"bytes,9,opt,name=OpUserId" json:"OpUserId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1812,7 +1754,7 @@ func (m *AlterUserReq) Reset() { *m = AlterUserReq{} }
func (m *AlterUserReq) String() string { return proto.CompactTextString(m) }
func (*AlterUserReq) ProtoMessage() {}
func (*AlterUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{33}
+ return fileDescriptor_user_862a17c60dc96c16, []int{32}
}
func (m *AlterUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AlterUserReq.Unmarshal(m, b)
@@ -1846,11 +1788,11 @@ func (m *AlterUserReq) GetOperationID() string {
return ""
}
-func (m *AlterUserReq) GetPhoneNumber() int64 {
+func (m *AlterUserReq) GetPhoneNumber() string {
if m != nil {
return m.PhoneNumber
}
- return 0
+ return ""
}
func (m *AlterUserReq) GetNickname() string {
@@ -1867,6 +1809,27 @@ func (m *AlterUserReq) GetEmail() string {
return ""
}
+func (m *AlterUserReq) GetGender() string {
+ if m != nil {
+ return m.Gender
+ }
+ return ""
+}
+
+func (m *AlterUserReq) GetBirth() string {
+ if m != nil {
+ return m.Birth
+ }
+ return ""
+}
+
+func (m *AlterUserReq) GetPhoto() string {
+ if m != nil {
+ return m.Photo
+ }
+ return ""
+}
+
func (m *AlterUserReq) GetOpUserId() string {
if m != nil {
return m.OpUserId
@@ -1885,7 +1848,7 @@ func (m *AlterUserResp) Reset() { *m = AlterUserResp{} }
func (m *AlterUserResp) String() string { return proto.CompactTextString(m) }
func (*AlterUserResp) ProtoMessage() {}
func (*AlterUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{34}
+ return fileDescriptor_user_862a17c60dc96c16, []int{33}
}
func (m *AlterUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AlterUserResp.Unmarshal(m, b)
@@ -1925,7 +1888,7 @@ func (m *GetUsersReq) Reset() { *m = GetUsersReq{} }
func (m *GetUsersReq) String() string { return proto.CompactTextString(m) }
func (*GetUsersReq) ProtoMessage() {}
func (*GetUsersReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{35}
+ return fileDescriptor_user_862a17c60dc96c16, []int{34}
}
func (m *GetUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersReq.Unmarshal(m, b)
@@ -1980,7 +1943,7 @@ func (m *GetUsersResp) Reset() { *m = GetUsersResp{} }
func (m *GetUsersResp) String() string { return proto.CompactTextString(m) }
func (*GetUsersResp) ProtoMessage() {}
func (*GetUsersResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{36}
+ return fileDescriptor_user_862a17c60dc96c16, []int{35}
}
func (m *GetUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersResp.Unmarshal(m, b)
@@ -2033,7 +1996,11 @@ type AddUserReq struct {
PhoneNumber string `protobuf:"bytes,2,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"`
UserId string `protobuf:"bytes,3,opt,name=UserId" json:"UserId,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
- OpUserId string `protobuf:"bytes,5,opt,name=OpUserId" json:"OpUserId,omitempty"`
+ Email string `protobuf:"bytes,5,opt,name=Email" json:"Email,omitempty"`
+ Gender string `protobuf:"bytes,6,opt,name=Gender" json:"Gender,omitempty"`
+ Birth string `protobuf:"bytes,7,opt,name=Birth" json:"Birth,omitempty"`
+ Photo string `protobuf:"bytes,8,opt,name=Photo" json:"Photo,omitempty"`
+ OpUserId string `protobuf:"bytes,9,opt,name=OpUserId" json:"OpUserId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -2043,7 +2010,7 @@ func (m *AddUserReq) Reset() { *m = AddUserReq{} }
func (m *AddUserReq) String() string { return proto.CompactTextString(m) }
func (*AddUserReq) ProtoMessage() {}
func (*AddUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{37}
+ return fileDescriptor_user_862a17c60dc96c16, []int{36}
}
func (m *AddUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddUserReq.Unmarshal(m, b)
@@ -2091,6 +2058,34 @@ func (m *AddUserReq) GetName() string {
return ""
}
+func (m *AddUserReq) GetEmail() string {
+ if m != nil {
+ return m.Email
+ }
+ return ""
+}
+
+func (m *AddUserReq) GetGender() string {
+ if m != nil {
+ return m.Gender
+ }
+ return ""
+}
+
+func (m *AddUserReq) GetBirth() string {
+ if m != nil {
+ return m.Birth
+ }
+ return ""
+}
+
+func (m *AddUserReq) GetPhoto() string {
+ if m != nil {
+ return m.Photo
+ }
+ return ""
+}
+
func (m *AddUserReq) GetOpUserId() string {
if m != nil {
return m.OpUserId
@@ -2109,7 +2104,7 @@ func (m *AddUserResp) Reset() { *m = AddUserResp{} }
func (m *AddUserResp) String() string { return proto.CompactTextString(m) }
func (*AddUserResp) ProtoMessage() {}
func (*AddUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{38}
+ return fileDescriptor_user_862a17c60dc96c16, []int{37}
}
func (m *AddUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddUserResp.Unmarshal(m, b)
@@ -2150,7 +2145,7 @@ func (m *BlockUserReq) Reset() { *m = BlockUserReq{} }
func (m *BlockUserReq) String() string { return proto.CompactTextString(m) }
func (*BlockUserReq) ProtoMessage() {}
func (*BlockUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{39}
+ return fileDescriptor_user_862a17c60dc96c16, []int{38}
}
func (m *BlockUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockUserReq.Unmarshal(m, b)
@@ -2209,7 +2204,7 @@ func (m *BlockUserResp) Reset() { *m = BlockUserResp{} }
func (m *BlockUserResp) String() string { return proto.CompactTextString(m) }
func (*BlockUserResp) ProtoMessage() {}
func (*BlockUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{40}
+ return fileDescriptor_user_862a17c60dc96c16, []int{39}
}
func (m *BlockUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockUserResp.Unmarshal(m, b)
@@ -2249,7 +2244,7 @@ func (m *UnBlockUserReq) Reset() { *m = UnBlockUserReq{} }
func (m *UnBlockUserReq) String() string { return proto.CompactTextString(m) }
func (*UnBlockUserReq) ProtoMessage() {}
func (*UnBlockUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{41}
+ return fileDescriptor_user_862a17c60dc96c16, []int{40}
}
func (m *UnBlockUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnBlockUserReq.Unmarshal(m, b)
@@ -2301,7 +2296,7 @@ func (m *UnBlockUserResp) Reset() { *m = UnBlockUserResp{} }
func (m *UnBlockUserResp) String() string { return proto.CompactTextString(m) }
func (*UnBlockUserResp) ProtoMessage() {}
func (*UnBlockUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{42}
+ return fileDescriptor_user_862a17c60dc96c16, []int{41}
}
func (m *UnBlockUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnBlockUserResp.Unmarshal(m, b)
@@ -2341,7 +2336,7 @@ func (m *GetBlockUsersReq) Reset() { *m = GetBlockUsersReq{} }
func (m *GetBlockUsersReq) String() string { return proto.CompactTextString(m) }
func (*GetBlockUsersReq) ProtoMessage() {}
func (*GetBlockUsersReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{43}
+ return fileDescriptor_user_862a17c60dc96c16, []int{42}
}
func (m *GetBlockUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockUsersReq.Unmarshal(m, b)
@@ -2395,7 +2390,7 @@ func (m *BlockUser) Reset() { *m = BlockUser{} }
func (m *BlockUser) String() string { return proto.CompactTextString(m) }
func (*BlockUser) ProtoMessage() {}
func (*BlockUser) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{44}
+ return fileDescriptor_user_862a17c60dc96c16, []int{43}
}
func (m *BlockUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockUser.Unmarshal(m, b)
@@ -2450,7 +2445,7 @@ func (m *GetBlockUsersResp) Reset() { *m = GetBlockUsersResp{} }
func (m *GetBlockUsersResp) String() string { return proto.CompactTextString(m) }
func (*GetBlockUsersResp) ProtoMessage() {}
func (*GetBlockUsersResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{45}
+ return fileDescriptor_user_862a17c60dc96c16, []int{44}
}
func (m *GetBlockUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockUsersResp.Unmarshal(m, b)
@@ -2510,7 +2505,7 @@ func (m *GetBlockUserByIdReq) Reset() { *m = GetBlockUserByIdReq{} }
func (m *GetBlockUserByIdReq) String() string { return proto.CompactTextString(m) }
func (*GetBlockUserByIdReq) ProtoMessage() {}
func (*GetBlockUserByIdReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{46}
+ return fileDescriptor_user_862a17c60dc96c16, []int{45}
}
func (m *GetBlockUserByIdReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockUserByIdReq.Unmarshal(m, b)
@@ -2555,7 +2550,7 @@ func (m *GetBlockUserByIdResp) Reset() { *m = GetBlockUserByIdResp{} }
func (m *GetBlockUserByIdResp) String() string { return proto.CompactTextString(m) }
func (*GetBlockUserByIdResp) ProtoMessage() {}
func (*GetBlockUserByIdResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{47}
+ return fileDescriptor_user_862a17c60dc96c16, []int{46}
}
func (m *GetBlockUserByIdResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockUserByIdResp.Unmarshal(m, b)
@@ -2595,7 +2590,7 @@ func (m *DeleteUserReq) Reset() { *m = DeleteUserReq{} }
func (m *DeleteUserReq) String() string { return proto.CompactTextString(m) }
func (*DeleteUserReq) ProtoMessage() {}
func (*DeleteUserReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{48}
+ return fileDescriptor_user_862a17c60dc96c16, []int{47}
}
func (m *DeleteUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUserReq.Unmarshal(m, b)
@@ -2647,7 +2642,7 @@ func (m *DeleteUserResp) Reset() { *m = DeleteUserResp{} }
func (m *DeleteUserResp) String() string { return proto.CompactTextString(m) }
func (*DeleteUserResp) ProtoMessage() {}
func (*DeleteUserResp) Descriptor() ([]byte, []int) {
- return fileDescriptor_user_f1112695e0d68005, []int{49}
+ return fileDescriptor_user_862a17c60dc96c16, []int{48}
}
func (m *DeleteUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUserResp.Unmarshal(m, b)
@@ -2689,7 +2684,6 @@ func init() {
proto.RegisterType((*UpdateUserInfoResp)(nil), "user.UpdateUserInfoResp")
proto.RegisterType((*SetGlobalRecvMessageOptReq)(nil), "user.SetGlobalRecvMessageOptReq")
proto.RegisterType((*SetGlobalRecvMessageOptResp)(nil), "user.SetGlobalRecvMessageOptResp")
- proto.RegisterType((*Conversation)(nil), "user.Conversation")
proto.RegisterType((*SetConversationReq)(nil), "user.SetConversationReq")
proto.RegisterType((*SetConversationResp)(nil), "user.SetConversationResp")
proto.RegisterType((*SetRecvMsgOptReq)(nil), "user.SetRecvMsgOptReq")
@@ -3526,129 +3520,127 @@ var _User_serviceDesc = grpc.ServiceDesc{
Metadata: "user/user.proto",
}
-func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_f1112695e0d68005) }
+func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_862a17c60dc96c16) }
-var fileDescriptor_user_f1112695e0d68005 = []byte{
- // 1923 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcd, 0x6f, 0x23, 0x49,
- 0x15, 0x57, 0xfb, 0x63, 0x92, 0x3c, 0xc7, 0x8e, 0x53, 0x93, 0x9d, 0xf4, 0xf6, 0xc2, 0xe0, 0x6d,
- 0x2d, 0x4b, 0x34, 0x12, 0x09, 0x0c, 0x88, 0x41, 0x8b, 0x60, 0x37, 0x76, 0x32, 0x96, 0x11, 0x93,
- 0x58, 0xed, 0x19, 0x09, 0x21, 0x44, 0xd4, 0x63, 0x57, 0x9c, 0x56, 0xec, 0xee, 0xde, 0xae, 0xf6,
- 0x7c, 0x70, 0x59, 0xb4, 0xc0, 0x05, 0x71, 0xe1, 0xc4, 0xc0, 0x81, 0xbf, 0x83, 0x3b, 0x9c, 0xf8,
- 0x0f, 0xe0, 0xc2, 0x9f, 0xc1, 0x15, 0xd5, 0x47, 0x77, 0x57, 0x55, 0xb7, 0x63, 0x6f, 0x67, 0x34,
- 0x97, 0xc4, 0xf5, 0xea, 0xa3, 0xdf, 0xef, 0xbd, 0xdf, 0x7b, 0xf5, 0xaa, 0x0a, 0x76, 0x16, 0x04,
- 0x47, 0x47, 0xf4, 0xcf, 0x61, 0x18, 0x05, 0x71, 0x80, 0x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, 0xd2, 0x2c, 0xd4,
- 0x4b, 0x8f, 0x88, 0xe2, 0xec, 0x90, 0x44, 0x59, 0xee, 0xac, 0x63, 0x99, 0xc5, 0x1d, 0x24, 0x44,
- 0x8f, 0xd8, 0x3b, 0x92, 0x38, 0xab, 0xa2, 0xbb, 0x7c, 0x9c, 0x72, 0x10, 0xb6, 0xf6, 0xf2, 0x42,
- 0x12, 0xa2, 0xef, 0xc3, 0x56, 0x5a, 0x63, 0x23, 0x71, 0xa1, 0x20, 0x1f, 0x17, 0xac, 0xbb, 0x39,
- 0x19, 0x09, 0xd1, 0x77, 0x61, 0x33, 0x51, 0x02, 0xed, 0xaa, 0x4a, 0xd1, 0x39, 0x48, 0x17, 0x91,
- 0x10, 0x1d, 0xc2, 0x86, 0x28, 0xca, 0x90, 0x48, 0x5d, 0x59, 0xf5, 0x68, 0xed, 0x6a, 0x12, 0xae,
- 0x58, 0xb6, 0xc7, 0x22, 0x3d, 0x2d, 0x67, 0x8a, 0xa9, 0xc5, 0xc6, 0x27, 0xd0, 0x90, 0xea, 0x8f,
- 0xc4, 0x11, 0x6a, 0xe9, 0x93, 0x38, 0x42, 0x2f, 0x54, 0x3e, 0x83, 0xa6, 0xb2, 0xa7, 0xa2, 0x2c,
- 0xee, 0x95, 0x52, 0xc4, 0xda, 0x2f, 0x94, 0xa7, 0x51, 0xa3, 0x6c, 0x34, 0x52, 0xd4, 0xe8, 0x5b,
- 0x9a, 0x14, 0x35, 0xf9, 0xbd, 0xe9, 0x11, 0x40, 0x96, 0xad, 0x12, 0x87, 0x2a, 0xdb, 0x8f, 0xb5,
- 0x97, 0x17, 0x92, 0xb0, 0xdb, 0xfc, 0x45, 0xe3, 0x90, 0x3d, 0x98, 0xff, 0x88, 0xfe, 0x79, 0x7e,
- 0x87, 0xbd, 0x86, 0x7f, 0xef, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x32, 0x71, 0xc8, 0xa6, 0x49,
- 0x1f, 0x00, 0x00,
+var fileDescriptor_user_862a17c60dc96c16 = []byte{
+ // 1900 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcb, 0x6f, 0x23, 0x49,
+ 0x19, 0x57, 0xc7, 0xf6, 0x24, 0xf9, 0x1c, 0x3f, 0x52, 0x93, 0x9d, 0xf4, 0xf6, 0xc2, 0x90, 0x6d,
+ 0x2d, 0x4b, 0x34, 0x12, 0x0e, 0x3b, 0x20, 0x8d, 0xb4, 0x88, 0xdd, 0x89, 0x9d, 0x8c, 0x65, 0x34,
+ 0x33, 0x89, 0xda, 0x3b, 0x12, 0x42, 0x88, 0xa8, 0x63, 0x57, 0x9c, 0x56, 0xec, 0xee, 0xde, 0xae,
+ 0xf6, 0x8c, 0xc2, 0x65, 0x11, 0x20, 0x21, 0xad, 0xe0, 0xc0, 0x09, 0x71, 0xe1, 0xc0, 0x9f, 0x02,
+ 0x37, 0xc4, 0x3f, 0xc0, 0x89, 0xff, 0x81, 0x0b, 0x17, 0x0e, 0xa8, 0x1e, 0xdd, 0x5d, 0xd5, 0xd5,
+ 0x8e, 0x3d, 0x9d, 0x88, 0xb9, 0x24, 0xfe, 0x7e, 0xf5, 0xe8, 0xef, 0xf7, 0xd5, 0xf7, 0xa8, 0x07,
+ 0xb4, 0xe6, 0x04, 0x47, 0x07, 0xf4, 0x4f, 0x27, 0x8c, 0x82, 0x38, 0x40, 0x55, 0xfa, 0xdb, 0xfa,
+ 0xf0, 0x24, 0xc4, 0xfe, 0xd9, 0xe0, 0xc5, 0x41, 0x78, 0x35, 0x39, 0x60, 0x0d, 0x07, 0x64, 0x7c,
+ 0x75, 0xf6, 0x86, 0x1c, 0xbc, 0x21, 0xbc, 0xa3, 0xf5, 0x89, 0xde, 0x65, 0x14, 0xf8, 0xaf, 0x71,
+ 0x44, 0xdc, 0xd8, 0x0b, 0x7c, 0x45, 0xe0, 0x43, 0xec, 0xcf, 0x00, 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 0x56, 0x95, 0xa2, 0x63, 0x50, 0x1e, 0x22, 0x21, 0xea, 0xc0, 0xba, 0xd8, 0x94, 0x21,
+ 0x91, 0xba, 0xb2, 0x7d, 0xa9, 0xb5, 0x9d, 0x43, 0xb8, 0x62, 0x59, 0x8d, 0x45, 0xf9, 0xb4, 0x9c,
+ 0x29, 0xa6, 0x6e, 0x36, 0x3e, 0x85, 0xba, 0xb4, 0xff, 0x48, 0x16, 0x42, 0xdd, 0xfa, 0x24, 0x0b,
+ 0x91, 0xdf, 0xa8, 0x3c, 0x85, 0x86, 0x52, 0x53, 0x51, 0x16, 0xf7, 0xca, 0x56, 0xc4, 0xda, 0x2d,
+ 0xc4, 0xd3, 0xa8, 0x51, 0x0a, 0x8d, 0x14, 0x35, 0xf9, 0x92, 0x26, 0x45, 0x8d, 0x5e, 0x9b, 0x9e,
+ 0x00, 0x64, 0xd9, 0x2a, 0x59, 0x50, 0xa5, 0xfc, 0x58, 0x3b, 0x3a, 0x48, 0xc2, 0x6e, 0xe3, 0xa7,
+ 0xf5, 0x0e, 0x7b, 0x77, 0xff, 0x21, 0xfd, 0x73, 0x7e, 0x8f, 0xbd, 0x90, 0x7f, 0xff, 0x7f, 0x01,
+ 0x00, 0x00, 0xff, 0xff, 0xb3, 0xba, 0x11, 0x76, 0x90, 0x1f, 0x00, 0x00,
}
diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto
index fa7025b28..a404a0c9e 100644
--- a/pkg/proto/user/user.proto
+++ b/pkg/proto/user/user.proto
@@ -1,5 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
+import "Open_IM/pkg/proto/conversation/conversation.proto";
option go_package = "./user;user";
package user;
@@ -75,25 +76,8 @@ message SetGlobalRecvMessageOptResp{
CommonResp commonResp = 1;
}
-message Conversation{
- string OwnerUserID = 1;
- string ConversationID = 2;
- int32 RecvMsgOpt = 3;
- int32 ConversationType = 4;
- string UserID = 5;
- string GroupID = 6;
- int32 UnreadCount = 7;
- int64 DraftTextTime = 8;
- bool IsPinned = 9;
- string AttachedInfo = 10;
- bool IsPrivateChat = 11;
- int32 GroupAtType = 12;
- bool IsNotInGroup = 13;
- string Ex = 14;
-}
-
message SetConversationReq{
- Conversation Conversation = 1;
+ conversation.Conversation Conversation = 1;
int32 notificationType = 2;
string OperationID = 3;
}
@@ -122,7 +106,7 @@ message GetConversationReq{
message GetConversationResp{
CommonResp commonResp = 1;
- Conversation Conversation = 2;
+ conversation.Conversation Conversation = 2;
}
message GetConversationsReq{
@@ -133,7 +117,7 @@ message GetConversationsReq{
message GetConversationsResp{
CommonResp commonResp = 1;
- repeated Conversation Conversations = 2;
+ repeated conversation.Conversation Conversations = 2;
}
message GetAllConversationsReq{
@@ -143,11 +127,11 @@ message GetAllConversationsReq{
message GetAllConversationsResp{
CommonResp commonResp = 1;
- repeated Conversation Conversations = 2;
+ repeated conversation.Conversation Conversations = 2;
}
message BatchSetConversationsReq{
- repeated Conversation Conversations = 1;
+ repeated conversation.Conversation Conversations = 1;
string OwnerUserID = 2;
int32 notificationType = 3;
string OperationID = 4;
@@ -178,7 +162,17 @@ message User{
string Nickname = 2;
string UserId = 3;
string CreateTime = 4;
- bool IsBlock = 5;
+ string PhoneNumber = 5;
+ string Email = 6;
+ string Birth = 7;
+ string CreateIp = 8;
+ string LastLoginTime = 9;
+ string LastLoginIp = 10;
+ int32 LoginTimes = 11;
+ int32 Gender = 12;
+ int32 LoginLimit = 13;
+ bool IsBlock = 14;
+ string RegisterIp = 15;
}
message GetUserByIdResp{
@@ -201,10 +195,13 @@ message GetUsersByNameResp {
message AlterUserReq{
string UserId = 1;
string OperationID = 2;
- int64 PhoneNumber = 3;
+ string PhoneNumber = 3;
string Nickname = 4;
string Email = 5;
- string OpUserId = 6;
+ string Gender = 6;
+ string Birth =7;
+ string Photo = 8;
+ string OpUserId = 9;
}
message AlterUserResp{
@@ -229,7 +226,11 @@ message AddUserReq{
string PhoneNumber = 2;
string UserId = 3;
string name = 4;
- string OpUserId = 5;
+ string Email = 5;
+ string Gender = 6;
+ string Birth =7;
+ string Photo = 8;
+ string OpUserId = 9;
}
message AddUserResp{
diff --git a/pkg/tools/retry/retry.go b/pkg/tools/retry/retry.go
new file mode 100644
index 000000000..8877dd0a5
--- /dev/null
+++ b/pkg/tools/retry/retry.go
@@ -0,0 +1,184 @@
+package retry
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "runtime/debug"
+ "time"
+)
+
+var (
+ ErrorAbort = errors.New("stop retry")
+ ErrorTimeout = errors.New("retry timeout")
+ ErrorContextDeadlineExceed = errors.New("context deadline exceeded")
+ ErrorEmptyRetryFunc = errors.New("empty retry function")
+ ErrorTimeFormat = errors.New("time out err")
+)
+
+type RetriesFunc func() error
+type Option func(c *Config)
+type HookFunc func()
+type RetriesChecker func(err error) (needRetry bool)
+type Config struct {
+ MaxRetryTimes int
+ Timeout time.Duration
+ RetryChecker RetriesChecker
+ Strategy Strategy
+ RecoverPanic bool
+ BeforeTry HookFunc
+ AfterTry HookFunc
+}
+
+var (
+ DefaultMaxRetryTimes = 3
+ DefaultTimeout = time.Minute
+ DefaultInterval = time.Second * 2
+ DefaultRetryChecker = func(err error) bool {
+ return !errors.Is(err, ErrorAbort) // not abort error, should continue retry
+ }
+)
+
+func newDefaultConfig() *Config {
+ return &Config{
+ MaxRetryTimes: DefaultMaxRetryTimes,
+ RetryChecker: DefaultRetryChecker,
+ Timeout: DefaultTimeout,
+ Strategy: NewLinear(DefaultInterval),
+ BeforeTry: func() {},
+ AfterTry: func() {},
+ }
+}
+
+func WithTimeout(timeout time.Duration) Option {
+ return func(c *Config) {
+ c.Timeout = timeout
+ }
+}
+
+func WithMaxRetryTimes(times int) Option {
+ return func(c *Config) {
+ c.MaxRetryTimes = times
+ }
+}
+
+func WithRecoverPanic() Option {
+ return func(c *Config) {
+ c.RecoverPanic = true
+ }
+}
+
+func WithBeforeHook(hook HookFunc) Option {
+ return func(c *Config) {
+ c.BeforeTry = hook
+ }
+}
+
+func WithAfterHook(hook HookFunc) Option {
+ return func(c *Config) {
+ c.AfterTry = hook
+ }
+}
+
+func WithRetryChecker(checker RetriesChecker) Option {
+ return func(c *Config) {
+ c.RetryChecker = checker
+ }
+}
+
+func WithBackOffStrategy(s BackoffStrategy, duration time.Duration) Option {
+ return func(c *Config) {
+ switch s {
+ case StrategyConstant:
+ c.Strategy = NewConstant(duration)
+ case StrategyLinear:
+ c.Strategy = NewLinear(duration)
+ case StrategyFibonacci:
+ c.Strategy = NewFibonacci(duration)
+ }
+ }
+}
+
+func WithCustomStrategy(s Strategy) Option {
+ return func(c *Config) {
+ c.Strategy = s
+ }
+}
+
+func Do(ctx context.Context, fn RetriesFunc, opts ...Option) error {
+ if fn == nil {
+ return ErrorEmptyRetryFunc
+ }
+ var (
+ abort = make(chan struct{}, 1) // caller choose to abort retry
+ run = make(chan error, 1)
+ panicInfoChan = make(chan string, 1)
+
+ timer *time.Timer
+ runErr error
+ )
+ config := newDefaultConfig()
+ for _, o := range opts {
+ o(config)
+ }
+ if config.Timeout > 0 {
+ timer = time.NewTimer(config.Timeout)
+ } else {
+ return ErrorTimeFormat
+ }
+ go func() {
+ var err error
+ defer func() {
+ if e := recover(); e == nil {
+ return
+ } else {
+ panicInfoChan <- fmt.Sprintf("retry function panic has occured, err=%v, stack:%s", e, string(debug.Stack()))
+ }
+ }()
+ for i := 0; i < config.MaxRetryTimes; i++ {
+ config.BeforeTry()
+ err = fn()
+ config.AfterTry()
+ if err == nil {
+ run <- nil
+ return
+ }
+ // check whether to retry
+ if config.RetryChecker != nil {
+ needRetry := config.RetryChecker(err)
+ if !needRetry {
+ abort <- struct{}{}
+ return
+ }
+ }
+ if config.Strategy != nil {
+ interval := config.Strategy.Sleep(i + 1)
+ <-time.After(interval)
+ }
+ }
+ run <- err
+ }()
+ select {
+ case <-ctx.Done():
+ // context deadline exceed
+ return ErrorContextDeadlineExceed
+ case <-timer.C:
+ // timeout
+ return ErrorTimeout
+ case <-abort:
+ // caller abort
+ return ErrorAbort
+ case msg := <-panicInfoChan:
+ // panic occurred
+ if !config.RecoverPanic {
+ panic(msg)
+ }
+ runErr = fmt.Errorf("panic occurred=%s", msg)
+ case e := <-run:
+ // normal run
+ if e != nil {
+ runErr = fmt.Errorf("retry failed, err=%w", e)
+ }
+ }
+ return runErr
+}
diff --git a/pkg/tools/retry/stratey.go b/pkg/tools/retry/stratey.go
new file mode 100644
index 000000000..e045684e8
--- /dev/null
+++ b/pkg/tools/retry/stratey.go
@@ -0,0 +1,56 @@
+package retry
+
+import "time"
+
+type BackoffStrategy int
+
+const (
+ StrategyConstant BackoffStrategy = iota
+ StrategyLinear
+ StrategyFibonacci
+)
+
+type Strategy interface {
+ Sleep(times int) time.Duration
+}
+type Constant struct {
+ startInterval time.Duration
+}
+
+func NewConstant(d time.Duration) *Constant {
+ return &Constant{startInterval: d}
+}
+
+type Linear struct {
+ startInterval time.Duration
+}
+
+func NewLinear(d time.Duration) *Linear {
+ return &Linear{startInterval: d}
+}
+
+type Fibonacci struct {
+ startInterval time.Duration
+}
+
+func NewFibonacci(d time.Duration) *Fibonacci {
+ return &Fibonacci{startInterval: d}
+}
+
+func (c *Constant) Sleep(_ int) time.Duration {
+ return c.startInterval
+}
+func (l *Linear) Sleep(times int) time.Duration {
+ return l.startInterval * time.Duration(times)
+
+}
+func (f *Fibonacci) Sleep(times int) time.Duration {
+ return f.startInterval * time.Duration(fibonacciNumber(times))
+
+}
+func fibonacciNumber(n int) int {
+ if n == 0 || n == 1 {
+ return n
+ }
+ return fibonacciNumber(n-1) + fibonacciNumber(n-2)
+}
diff --git a/pkg/tools/tools.go b/pkg/tools/splitter/tools.go
similarity index 97%
rename from pkg/tools/tools.go
rename to pkg/tools/splitter/tools.go
index a3baa5f3e..40bd7dee2 100644
--- a/pkg/tools/tools.go
+++ b/pkg/tools/splitter/tools.go
@@ -1,4 +1,4 @@
-package tools
+package splitter
type SplitResult struct {
Item []string
diff --git a/script/check_all.sh b/script/check_all.sh
index c036142f9..2ec2b8270 100644
--- a/script/check_all.sh
+++ b/script/check_all.sh
@@ -56,13 +56,13 @@ else
fi
-#check=$(ps aux | grep -w ./${timer_task_name} | grep -v grep | wc -l)
+#check=$(ps aux | grep -w ./${cron_task_name} | grep -v grep | wc -l)
#if [ $check -ge 1 ]; then
-# echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImMsgTimer"${COLOR_SUFFIX}
+# echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImCronTask"${COLOR_SUFFIX}
#else
-# echo -e ${RED_PREFIX}"openImMsgTimer service does not start normally"${COLOR_SUFFIX}
+# echo -e ${RED_PREFIX}"cron_task_name service does not start normally"${COLOR_SUFFIX}
# echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
# exit -1
#fi
-
-echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
+#
+#echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
diff --git a/script/mongo-init.sh b/script/mongo-init.sh
index ad9c84428..3d1faa60b 100644
--- a/script/mongo-init.sh
+++ b/script/mongo-init.sh
@@ -6,7 +6,7 @@ db.createUser({
user: "$MONGO_USERNAME",
pwd: "$MONGO_PASSWORD",
roles: [
- { role: 'readWrite', db: '$MONGO_INITDB_DATABASE' }
+ { role: 'root', db: '$MONGO_INITDB_DATABASE' }
]
})
EOF
diff --git a/script/path_info.cfg b/script/path_info.cfg
index 17382cbfd..6562f1d7f 100644
--- a/script/path_info.cfg
+++ b/script/path_info.cfg
@@ -27,6 +27,10 @@ demo_server_name="open_im_demo"
demo_server_binary_root="../bin/"
demo_server_source_root="../cmd/open_im_demo/"
+cron_task_name="open_im_cron_task"
+cron_task_binary_root="../bin/"
+cron_task_source_root="../cmd/open_im_cron_task/"
+
#Global configuration file default dir
config_path="../config/config.yaml"
@@ -48,6 +52,7 @@ service_source_root=(
../cmd/rpc/open_im_organization/
../cmd/rpc/open_im_conversation/
../cmd/rpc/open_im_cache/
+ ../cmd/open_im_cron_task
${msg_gateway_source_root}
${msg_transfer_source_root}
${msg_source_root}
@@ -72,6 +77,7 @@ service_names=(
open_im_organization
open_im_conversation
open_im_cache
+ open_im_cron_task
${msg_gateway_name}
${msg_transfer_name}
${msg_name}
diff --git a/script/sdk_svr_start.sh b/script/sdk_svr_start.sh
index 5ac90501d..115ceff82 100644
--- a/script/sdk_svr_start.sh
+++ b/script/sdk_svr_start.sh
@@ -4,17 +4,13 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
ulimit -n 200000
-list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}')
-list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
+
+ws_address=$(cat $config_path | grep openImWsAddress | awk -F '[ ]' '{print $NF}')
+api_address=$(cat $config_path | grep openImApiAddress | awk -F '[ ]' '{print $NF}')
list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}')
logLevel=$(cat $config_path | grep remainLogLevel | awk -F '[:]' '{print $NF}')
-list_to_string $list1
-api_ports=($ports_array)
-list_to_string $list2
-ws_ports=($ports_array)
list_to_string $list3
sdk_ws_ports=($ports_array)
-list_to_string $list4
@@ -28,7 +24,7 @@ fi
#Waiting port recycling
sleep 1
cd ${sdk_server_binary_root}
- nohup ./${sdk_server_name} -openIM_api_port ${api_ports[0]} -openIM_ws_port ${ws_ports[0]} -sdk_ws_port ${sdk_ws_ports[0]} -openIM_log_level ${logLevel} >>../logs/openIM.log 2>&1 &
+ nohup ./${sdk_server_name} -openIM_ws_address ${ws_address} -sdk_ws_port ${sdk_ws_ports[0]} -openIM_api_address ${api_address} -openIM_log_level ${logLevel} >>../logs/openIM.log 2>&1 &
#Check launched service process
sleep 3
diff --git a/script/start_all.sh b/script/start_all.sh
index 9fcbd1c6a..223187973 100644
--- a/script/start_all.sh
+++ b/script/start_all.sh
@@ -10,6 +10,7 @@ need_to_start_server_shell=(
sdk_svr_start.sh
msg_gateway_start.sh
demo_svr_start.sh
+# start_cron.sh
)
time=`date +"%Y-%m-%d %H:%M:%S"`
echo "==========================================================">>../logs/openIM.log 2>&1 &
diff --git a/script/start_cron.sh b/script/start_cron.sh
new file mode 100644
index 000000000..9c33478de
--- /dev/null
+++ b/script/start_cron.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+#Include shell font styles and some basic information
+source ./style_info.cfg
+source ./path_info.cfg
+
+
+
+#Check if the service exists
+#If it is exists,kill this process
+check=`ps aux | grep -w ./${cron_task_name} | grep -v grep| wc -l`
+if [ $check -ge 1 ]
+then
+oldPid=`ps aux | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
+ kill -9 $oldPid
+fi
+#Waiting port recycling
+sleep 1
+
+cd ${cron_task_binary_root}
+#for ((i = 0; i < ${cron_task_service_num}; i++)); do
+ nohup ./${cron_task_name} >>../logs/openIM.log 2>&1 &
+#done
+
+#Check launched service process
+check=`ps aux | grep -w ./${cron_task_name} | grep -v grep| wc -l`
+if [ $check -ge 1 ]
+then
+newPid=`ps aux | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
+allPorts=""
+ echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS "${COLOR_SUFFIX}
+ echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${cron_task_name}${COLOR_SUFFIX}
+ echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${newPid}${COLOR_SUFFIX}
+ echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}
+else
+ echo -e ${YELLOW_PREFIX}${cron_task_name}${COLOR_SUFFIX}${RED_PREFIX}"SERVICE START ERROR, PLEASE CHECK openIM.log"${COLOR_SUFFIX}
+fi