Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release

This commit is contained in:
wenxu12345 2022-07-29 15:48:00 +08:00
commit d278dfb996
30 changed files with 713 additions and 373 deletions

View File

@ -118,6 +118,7 @@ credential: #腾讯cos发送图片、视频、文件时需要请自行申
endpointInnerEnable: true #是否启用minio内网地址 启用可以让桶初始化IM server连接minio走内网地址访问 endpointInnerEnable: true #是否启用minio内网地址 启用可以让桶初始化IM server连接minio走内网地址访问
accessKeyID: user12345 accessKeyID: user12345
secretAccessKey: key12345 secretAccessKey: key12345
storageTime: 50 #文件在minio中保存的时间
ali: # ali oss ali: # ali oss
regionID: "oss-cn-beijing" regionID: "oss-cn-beijing"
accessKeyID: "" accessKeyID: ""
@ -130,7 +131,7 @@ credential: #腾讯cos发送图片、视频、文件时需要请自行申
OssRoleArn: "acs:ram::xxx:role/xxx" OssRoleArn: "acs:ram::xxx:role/xxx"
dtm: dtm:
serverURL: 43.128.5.63:10007 serverURL: 127.0.0.1:10007
rpcport: #rpc服务端口 默认即可 rpcport: #rpc服务端口 默认即可
openImUserPort: [ 10110 ] openImUserPort: [ 10110 ]
@ -210,7 +211,7 @@ push:
masterSecret: 02204efe3f3832947a236ee5 masterSecret: 02204efe3f3832947a236ee5
pushUrl: "https://api.jpush.cn/v3/push" pushUrl: "https://api.jpush.cn/v3/push"
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end" pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
enable: true enable: false
getui: #个推推送 getui: #个推推送
pushUrl: "https://restapi.getui.com/v2/$appId" pushUrl: "https://restapi.getui.com/v2/$appId"
masterSecret: "" masterSecret: ""
@ -218,8 +219,8 @@ push:
intent: "" intent: ""
enable: false enable: false
fcm: #firebase cloud message 消息推送 fcm: #firebase cloud message 消息推送
serviceAccount: "openim-*-firebase-adminsdk-*-*.json" #帐号文件,此处需要改修配置,并且这个文件放在 config目录下 serviceAccount: "openim-5c6c0-firebase-adminsdk-ppwol-8765884a78.json" #帐号文件,此处需要改修配置,并且这个文件放在 config目录下
enable: false enable: true
@ -300,6 +301,15 @@ callback:
enable: false enable: false
callbackTimeOut: 2 callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续离线推送 callbackFailedContinue: true # 回调超时是否继续离线推送
callbackOnlinePush:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续离线推送
callbackSuperGroupOnlinePush:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续离线推送
notification: notification:
groupCreated: groupCreated:

View File

@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "openim-5c6c0",
"private_key_id": "8765884a7875fd3c0a73bbc1718bdaeca39fd609",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC90b1YDn14JsY8\nu5a0RIx7yAWmsn8JuoceVPvFzAv45iuU3MfsD51TKY+gjmydFAMpUuEQKYF2hXie\nJt5+EaBf/RWch2zmHK+husQVJpRvKmTNPjT/fT2FqneozriQZ7QedRiKhkv2lb9A\n3QFO3kmeAI7W4DR+22wadNKBX/REv+nZECz6uaPZ9cRvUYb8GCYkcteau62P0z4E\n3sOHe52Pix0OV06vI47PTNmbhZOozF0wdVfxOe5eE5kQ8VZq2oQ+6SHZwNhl+7py\nHAN8Cgq4JXGrjNdafku9UNuLpYLv3a7DejNe1R5tkITE2P01Us43T7HRuZ8W8mV0\nCl9DU+HfAgMBAAECggEAVxu4M3+6znekw1wmpaVLfsZk6YHCULmbpizDuZqQ5/Dg\nkRjcWhU0UmShN8IET/VOGhmhlOQnODe6CYG22s3F9ibTUxjGvbbuVl65+ybQOU+Q\nIKvqcFCN+hgnf30WL5aXjt6Xm4JTu94ufVqubf4OdIa3Bh6vmIOjUWTI8XwSQbWx\n8llfOL4ElMdmtxg0N5iDmkSXfTgZWfty861s76bqazD1cQhMOYPXP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c0.iam.gserviceaccount.com",
"client_id": "117878683878601533433",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-ppwol%40openim-5c6c0.iam.gserviceaccount.com"
}

9
go.mod
View File

@ -12,9 +12,7 @@ require (
github.com/alibabacloud-go/tea v1.1.17 github.com/alibabacloud-go/tea v1.1.17
github.com/antonfisher/nested-logrus-formatter v1.3.0 github.com/antonfisher/nested-logrus-formatter v1.3.0
github.com/bwmarrin/snowflake v0.3.0 github.com/bwmarrin/snowflake v0.3.0
github.com/dtm-labs/dtmcli v1.15.0 // indirect github.com/dtm-labs/rockscache v0.0.11
github.com/dtm-labs/dtmgrpc v1.15.0 // indirect
github.com/dtm-labs/rockscache v0.0.8
github.com/fatih/structs v1.1.0 github.com/fatih/structs v1.1.0
github.com/gin-gonic/gin v1.8.1 github.com/gin-gonic/gin v1.8.1
github.com/go-openapi/spec v0.20.6 // indirect github.com/go-openapi/spec v0.20.6 // indirect
@ -30,14 +28,12 @@ require (
github.com/jonboulle/clockwork v0.2.2 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
github.com/lestrrat-go/strftime v1.0.4 // indirect github.com/lestrrat-go/strftime v1.0.4 // indirect
github.com/lithammer/shortuuid v3.0.0+incompatible // indirect
github.com/minio/minio-go/v7 v7.0.22 github.com/minio/minio-go/v7 v7.0.22
github.com/mitchellh/mapstructure v1.4.2 github.com/mitchellh/mapstructure v1.4.2
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/olivere/elastic/v7 v7.0.23 github.com/olivere/elastic/v7 v7.0.23
github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.1
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
github.com/sirupsen/logrus v1.8.1 github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.2 github.com/stretchr/testify v1.7.2
@ -50,6 +46,9 @@ require (
go.etcd.io/etcd/api/v3 v3.5.4 go.etcd.io/etcd/api/v3 v3.5.4
go.etcd.io/etcd/client/v3 v3.5.4 go.etcd.io/etcd/client/v3 v3.5.4
go.mongodb.org/mongo-driver v1.8.3 go.mongodb.org/mongo-driver v1.8.3
go.uber.org/atomic v1.9.0 // indirect
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/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
golang.org/x/net v0.0.0-20220622184535-263ec571b305 golang.org/x/net v0.0.0-20220622184535-263ec571b305

31
go.sum
View File

@ -50,8 +50,6 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4=
firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
@ -105,7 +103,6 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
@ -139,14 +136,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/dtm-labs/dtmcli v1.15.0 h1:kqiV47I9Am/0QuzX11cGTPp/Z2AcOaRDXU7E7SZWYNk= github.com/dtm-labs/rockscache v0.0.11 h1:V6M+KH9fFRFDXgB+Uux1d6zwhZt1O34sgPwM0wjud9Y=
github.com/dtm-labs/dtmcli v1.15.0/go.mod h1:otEdxUwM5FIKlCLmg5hL5+Z539DmCK2YJ0G4WNsP6Tw= github.com/dtm-labs/rockscache v0.0.11/go.mod h1:vJmJJmuBNxcio03abYk1QPLmmQo/Kg92jB+28QmLcgY=
github.com/dtm-labs/dtmdriver v0.0.3 h1:9iAtvXKR3lJXQ7dvS87e4xdtmqkzN+ofek+CF9AvUSY=
github.com/dtm-labs/dtmdriver v0.0.3/go.mod h1:fLiEeD2BPwM9Yq96TfcP9KpbTwFsn5nTxa/PP0jmFuk=
github.com/dtm-labs/dtmgrpc v1.15.0 h1:ZLSbCa/83J4LUR2A/h1h68D6EPuFfDkiUTZ5btKlJvg=
github.com/dtm-labs/dtmgrpc v1.15.0/go.mod h1:fc7Mg6UGrNsHVsPrFNZhAH12/ddNHUP5E84EQY1Fz7w=
github.com/dtm-labs/rockscache v0.0.8 h1:H6cXO7YhguE9jdvdfK5rrbUUu2MWjgWqsGEA645iFQQ=
github.com/dtm-labs/rockscache v0.0.8/go.mod h1:vJmJJmuBNxcio03abYk1QPLmmQo/Kg92jB+28QmLcgY=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
@ -217,12 +208,8 @@ github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw= github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw=
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w/BIH7cC3Q=
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
@ -418,7 +405,6 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4=
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
@ -440,8 +426,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= 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-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM=
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
@ -459,7 +443,6 @@ github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
@ -484,21 +467,17 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
@ -711,9 +690,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/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 h1:dAgbJ2SP4jD6XYfMNLVj0BF21jo2PjChrtGaAvF5M3I=
golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
@ -989,7 +966,6 @@ google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKr
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 h1:z+ErRPu0+KS02Td3fOAgdX+lnPDh/VyaABEJPD4JRQs=
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
@ -1023,7 +999,6 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
@ -1061,8 +1036,6 @@ gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

View File

@ -29,10 +29,10 @@ import (
var validate *validator.Validate var validate *validator.Validate
func SetOptions(options map[string]bool, value bool) { func SetOptions(options map[string]bool, value bool) {
utils.SetSwitchFromOptions(options, constant.IsOfflinePush, value)
utils.SetSwitchFromOptions(options, constant.IsHistory, value) utils.SetSwitchFromOptions(options, constant.IsHistory, value)
utils.SetSwitchFromOptions(options, constant.IsPersistent, value) utils.SetSwitchFromOptions(options, constant.IsPersistent, value)
utils.SetSwitchFromOptions(options, constant.IsSenderSync, value) utils.SetSwitchFromOptions(options, constant.IsSenderSync, value)
utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, value)
} }
func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq { func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
@ -59,10 +59,12 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
if params.IsOnlineOnly { if params.IsOnlineOnly {
SetOptions(options, false) SetOptions(options, false)
} }
if params.ContentType == constant.CustomMsgOnlineOnly { if params.NotOfflinePush {
SetOptions(options, false) utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false)
} else if params.ContentType == constant.CustomMsgNotTriggerConversation { }
if params.ContentType == constant.CustomOnlineOnly {
SetOptions(options, false) SetOptions(options, false)
} else if params.ContentType == constant.CustomNotTriggerConversation {
utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, false) utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, false)
} }
@ -146,9 +148,9 @@ func ManagementSendMsg(c *gin.Context) {
case constant.OANotification: case constant.OANotification:
data = OANotificationElem{} data = OANotificationElem{}
params.SessionType = constant.NotificationChatType params.SessionType = constant.NotificationChatType
case constant.CustomMsgNotTriggerConversation: case constant.CustomNotTriggerConversation:
data = CustomElem{} data = CustomElem{}
case constant.CustomMsgOnlineOnly: case constant.CustomOnlineOnly:
data = CustomElem{} data = CustomElem{}
//case constant.HasReadReceipt: //case constant.HasReadReceipt:
//case constant.Typing: //case constant.Typing:
@ -277,9 +279,9 @@ func ManagementBatchSendMsg(c *gin.Context) {
case constant.OANotification: case constant.OANotification:
data = OANotificationElem{} data = OANotificationElem{}
params.SessionType = constant.NotificationChatType params.SessionType = constant.NotificationChatType
case constant.CustomMsgNotTriggerConversation: case constant.CustomNotTriggerConversation:
data = CustomElem{} data = CustomElem{}
case constant.CustomMsgOnlineOnly: case constant.CustomOnlineOnly:
data = CustomElem{} data = CustomElem{}
//case constant.HasReadReceipt: //case constant.HasReadReceipt:
//case constant.Typing: //case constant.Typing:
@ -322,12 +324,11 @@ func ManagementBatchSendMsg(c *gin.Context) {
return return
} }
client := pbChat.NewMsgClient(etcdConn) client := pbChat.NewMsgClient(etcdConn)
req := &api.ManagementSendMsgReq{
ManagementSendMsg: params.ManagementSendMsg,
}
pbData := newUserSendMsgReq(req)
for _, recvID := range params.RecvIDList { for _, recvID := range params.RecvIDList {
req := &api.ManagementSendMsgReq{
ManagementSendMsg: params.ManagementSendMsg,
RecvID: recvID,
}
pbData := newUserSendMsgReq(req)
pbData.MsgData.RecvID = recvID pbData.MsgData.RecvID = recvID
log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String()) log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String())
@ -344,10 +345,11 @@ func ManagementBatchSendMsg(c *gin.Context) {
msgSendFailedFlag = true msgSendFailedFlag = true
continue continue
} }
resp.Data.ResultList = append(resp.Data.ResultList, server_api_params.UserSendMsgResp{ resp.Data.ResultList = append(resp.Data.ResultList, &api.SingleReturnResult{
ServerMsgID: rpcResp.ServerMsgID, ServerMsgID: rpcResp.ServerMsgID,
ClientMsgID: rpcResp.ClientMsgID, ClientMsgID: rpcResp.ClientMsgID,
SendTime: rpcResp.SendTime, SendTime: rpcResp.SendTime,
RecvID: recvID,
}) })
} }
if msgSendFailedFlag { if msgSendFailedFlag {

View File

@ -78,15 +78,18 @@ func DelSuperGroupMsg(c *gin.Context) {
req api.DelSuperGroupMsgReq req api.DelSuperGroupMsgReq
resp api.DelSuperGroupMsgResp resp api.DelSuperGroupMsgResp
) )
rpcReq := &rpc.DelSuperGroupMsgReq{}
utils.CopyStructFields(req, &req)
if err := c.BindJSON(&req); err != nil { if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return return
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
var ok bool
ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) var errInfo string
ok, rpcReq.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok { if !ok {
errMsg := req.OperationID + " " + opUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") errMsg := req.OperationID + " " + rpcReq.OpUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg) log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return return
@ -137,18 +140,32 @@ func DelSuperGroupMsg(c *gin.Context) {
client := rpc.NewMsgClient(etcdConn) client := rpc.NewMsgClient(etcdConn)
log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...") log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...")
if req.IsAllDelete {
RpcResp, err := client.SendMsg(context.Background(), &pbData) RpcResp, err := client.DelSuperGroupMsg(context.Background(),rpcReq)
if err != nil { if err != nil {
log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"})
return return
}
log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String())
resp.ErrCode = RpcResp.ErrCode
resp.ErrMsg = RpcResp.ErrMsg
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
}else{
RpcResp, err := client.SendMsg(context.Background(), &pbData)
if err != nil {
log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"})
return
}
log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String())
resp.ErrCode = RpcResp.ErrCode
resp.ErrMsg = RpcResp.ErrMsg
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
} }
log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String())
resp.ErrCode = RpcResp.ErrCode
resp.ErrMsg = RpcResp.ErrMsg
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
} }
// @Summary 清空用户消息 // @Summary 清空用户消息

View File

@ -160,6 +160,7 @@ func MinioStorageCredential(c *gin.Context) {
resp.AccessKeyID = v.AccessKeyID resp.AccessKeyID = v.AccessKeyID
resp.BucketName = config.Config.Credential.Minio.Bucket resp.BucketName = config.Config.Credential.Minio.Bucket
resp.StsEndpointURL = config.Config.Credential.Minio.Endpoint resp.StsEndpointURL = config.Config.Credential.Minio.Endpoint
resp.StorageTime = config.Config.Credential.Minio.StorageTime
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp}) c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
} }

View File

@ -17,11 +17,13 @@ func callbackUserOnline(operationID, userID string, platformID int, token string
callbackUserOnlineReq := cbApi.CallbackUserOnlineReq{ callbackUserOnlineReq := cbApi.CallbackUserOnlineReq{
Token: token, Token: token,
UserStatusCallbackReq: cbApi.UserStatusCallbackReq{ UserStatusCallbackReq: cbApi.UserStatusCallbackReq{
CallbackCommand: constant.CallbackUserOnlineCommand, UserStatusBaseCallback: cbApi.UserStatusBaseCallback{
OperationID: operationID, CallbackCommand: constant.CallbackUserOnlineCommand,
UserID: userID, OperationID: operationID,
PlatformID: int32(platformID), PlatformID: int32(platformID),
Platform: constant.PlatformIDToName(platformID), Platform: constant.PlatformIDToName(platformID),
},
UserID: userID,
}, },
Seq: int(time.Now().UnixNano() / 1e6), Seq: int(time.Now().UnixNano() / 1e6),
} }
@ -40,11 +42,13 @@ func callbackUserOffline(operationID, userID string, platformID int) cbApi.Commo
} }
callbackOfflineReq := cbApi.CallbackUserOfflineReq{ callbackOfflineReq := cbApi.CallbackUserOfflineReq{
UserStatusCallbackReq: cbApi.UserStatusCallbackReq{ UserStatusCallbackReq: cbApi.UserStatusCallbackReq{
CallbackCommand: constant.CallbackUserOfflineCommand, UserStatusBaseCallback: cbApi.UserStatusBaseCallback{
OperationID: operationID, CallbackCommand: constant.CallbackUserOfflineCommand,
UserID: userID, OperationID: operationID,
PlatformID: int32(platformID), PlatformID: int32(platformID),
Platform: constant.PlatformIDToName(platformID), Platform: constant.PlatformIDToName(platformID),
},
UserID: userID,
}, },
Seq: int(time.Now().UnixNano() / 1e6), Seq: int(time.Now().UnixNano() / 1e6),
} }

View File

@ -36,7 +36,12 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(cMsg *sarama.Con
} }
err = db.DB.BatchInsertChat2DB(msgFromMQ.AggregationID, msgFromMQ.MessageList, msgFromMQ.TriggerID, msgFromMQ.LastSeq) err = db.DB.BatchInsertChat2DB(msgFromMQ.AggregationID, msgFromMQ.MessageList, msgFromMQ.TriggerID, msgFromMQ.LastSeq)
if err != nil { if err != nil {
log.NewError(msgFromMQ.TriggerID, "single data insert to mongo err", err.Error(), msgFromMQ.MessageList) log.NewError(msgFromMQ.TriggerID, "single data insert to mongo err", err.Error(), msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.TriggerID)
} else {
err = db.DB.DeleteMessageFromCache(msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.GetTriggerID())
if err != nil {
log.NewError(msgFromMQ.TriggerID, "remove cache msg from redis err", err.Error(), msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.TriggerID)
}
} }
for _, v := range msgFromMQ.MessageList { for _, v := range msgFromMQ.MessageList {
if v.MsgData.ContentType == constant.DeleteMessageNotification { if v.MsgData.ContentType == constant.DeleteMessageNotification {

View File

@ -1,36 +1,30 @@
package push package fcm
import ( import (
"Open_IM/internal/push" "Open_IM/internal/push"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/db" "Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"context" "context"
"log"
"path/filepath"
"strconv"
firebase "firebase.google.com/go" firebase "firebase.google.com/go"
"firebase.google.com/go/messaging" "firebase.google.com/go/messaging"
"google.golang.org/api/option" "google.golang.org/api/option"
"path/filepath"
"strconv"
) )
type Fcm struct { type Fcm struct {
}
var (
FcmClient *Fcm
FcmMsgCli *messaging.Client FcmMsgCli *messaging.Client
)
func init() {
//FcmClient = newFcmClient()
} }
func NewFcm() *Fcm {
return newFcmClient()
}
func newFcmClient() *Fcm { func newFcmClient() *Fcm {
opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount)) opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount))
fcmApp, err := firebase.NewApp(context.Background(), nil, opt) fcmApp, err := firebase.NewApp(context.Background(), nil, opt)
if err != nil { if err != nil {
log.Println("error initializing app: %v\n", err) log.Debug("", "error initializing app: ", err.Error())
return nil return nil
} }
//授权 //授权
@ -41,13 +35,12 @@ func newFcmClient() *Fcm {
// } // }
// log.Printf("%#v\r\n", fcmClient) // log.Printf("%#v\r\n", fcmClient)
ctx := context.Background() ctx := context.Background()
FcmMsgCli, err = fcmApp.Messaging(ctx) fcmMsgClient, err := fcmApp.Messaging(ctx)
if err != nil { if err != nil {
log.Fatalf("error getting Messaging client: %v\n", err) panic(err.Error())
return nil return nil
} }
log.Println(FcmMsgCli) return &Fcm{FcmMsgCli: fcmMsgClient}
return &Fcm{}
} }
func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string, opts push.PushOpts) (string, error) { func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string, opts push.PushOpts) (string, error) {
@ -87,9 +80,9 @@ func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string,
//An error from SendMulticast indicates a total failure -- i.e. //An error from SendMulticast indicates a total failure -- i.e.
//the message could not be sent to any of the recipients. //the message could not be sent to any of the recipients.
//Partial failures are indicated by a `BatchResponse` return value. //Partial failures are indicated by a `BatchResponse` return value.
response, err := FcmMsgCli.SendMulticast(ctx, Msg) response, err := f.FcmMsgCli.SendMulticast(ctx, Msg)
if err != nil { if err != nil {
log.Fatalln(err) return "", err
} }
Success = Success + response.SuccessCount Success = Success + response.SuccessCount
Fail = Fail + response.FailureCount Fail = Fail + response.FailureCount

View File

@ -5,22 +5,22 @@ import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/http" "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
commonPb "Open_IM/pkg/proto/sdk_ws" commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
http2 "net/http" http2 "net/http"
) )
func callbackOfflinePush(operationID, userID string, msg *commonPb.MsgData) cbApi.CommonCallbackResp { func callbackBeforePush(operationID string, userIDList []string, msg *commonPb.MsgData, command string, callbackResp cbApi.CommonCallbackResp, timeOut int) cbApi.CommonCallbackResp {
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID} req := cbApi.CallbackBeforePushReq{
if !config.Config.Callback.CallbackOfflinePush.Enable { UserStatusBatchCallbackReq: cbApi.UserStatusBatchCallbackReq{
return callbackResp UserStatusBaseCallback: cbApi.UserStatusBaseCallback{
} CallbackCommand: command,
callbackOfflinePushReq := cbApi.CallbackOfflinePushReq{ OperationID: operationID,
UserStatusCallbackReq: cbApi.UserStatusCallbackReq{ PlatformID: msg.SenderPlatformID,
CallbackCommand: constant.CallbackOfflinePushCommand, Platform: constant.PlatformIDToName(int(msg.SenderPlatformID)),
OperationID: operationID, },
UserID: userID, UserIDList: userIDList,
PlatformID: msg.SenderPlatformID,
Platform: constant.PlatformIDToName(int(msg.SenderPlatformID)),
}, },
OfflinePushInfo: msg.OfflinePushInfo, OfflinePushInfo: msg.OfflinePushInfo,
SendID: msg.SendID, SendID: msg.SendID,
@ -30,8 +30,8 @@ func callbackOfflinePush(operationID, userID string, msg *commonPb.MsgData) cbAp
AtUserIDList: msg.AtUserIDList, AtUserIDList: msg.AtUserIDList,
Content: string(msg.Content), Content: string(msg.Content),
} }
callbackOfflinePushResp := &cbApi.CallbackOfflinePushResp{CommonCallbackResp: &callbackResp} resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp}
if err := http.PostReturn(config.Config.Callback.CallbackUrl, callbackOfflinePushReq, callbackOfflinePushResp, config.Config.Callback.CallbackOfflinePush.CallbackTimeOut); err != nil { if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, timeOut); err != nil {
callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrCode = http2.StatusInternalServerError
callbackResp.ErrMsg = err.Error() callbackResp.ErrMsg = err.Error()
if !config.Config.Callback.CallbackOfflinePush.CallbackFailedContinue { if !config.Config.Callback.CallbackOfflinePush.CallbackFailedContinue {
@ -44,3 +44,59 @@ func callbackOfflinePush(operationID, userID string, msg *commonPb.MsgData) cbAp
} }
return callbackResp return callbackResp
} }
func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.MsgData) cbApi.CommonCallbackResp {
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
if !config.Config.Callback.CallbackOfflinePush.Enable {
return callbackResp
}
return callbackBeforePush(operationID, userIDList, msg, constant.CallbackOfflinePushCommand, callbackResp, config.Config.Callback.CallbackOfflinePush.CallbackTimeOut)
}
func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.MsgData) cbApi.CommonCallbackResp {
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
if !config.Config.Callback.CallbackOnlinePush.Enable {
return callbackResp
}
return callbackBeforePush(operationID, userIDList, msg, constant.CallbackOnlinePushCommand, callbackResp, config.Config.Callback.CallbackOnlinePush.CallbackTimeOut)
}
func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg *commonPb.MsgData, pushToUserList *[]string) cbApi.CommonCallbackResp {
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
if !config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.Enable {
return callbackResp
}
req := cbApi.CallbackBeforeSuperGroupOnlinePushReq{
UserStatusBaseCallback: cbApi.UserStatusBaseCallback{
CallbackCommand: constant.CallbackSuperGroupOnlinePushCommand,
OperationID: operationID,
PlatformID: msg.SenderPlatformID,
Platform: constant.PlatformIDToName(int(msg.SenderPlatformID)),
},
OfflinePushInfo: msg.OfflinePushInfo,
SendID: msg.SendID,
GroupID: groupID,
ContentType: msg.ContentType,
SessionType: msg.SessionType,
AtUserIDList: msg.AtUserIDList,
Content: string(msg.Content),
}
resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: &callbackResp}
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.CallbackTimeOut); err != nil {
callbackResp.ErrCode = http2.StatusInternalServerError
callbackResp.ErrMsg = err.Error()
if !config.Config.Callback.CallbackOfflinePush.CallbackFailedContinue {
callbackResp.ActionCode = constant.ActionForbidden
return callbackResp
} else {
callbackResp.ActionCode = constant.ActionAllow
return callbackResp
}
}
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow && len(resp.UserIDList) != 0 {
*pushToUserList = resp.UserIDList
}
log.NewDebug(operationID, utils.GetSelfFuncName(), pushToUserList, resp.UserIDList)
return callbackResp
}

View File

@ -44,7 +44,7 @@ func init() {
} }
if config.Config.Push.Fcm.Enable { if config.Config.Push.Fcm.Enable {
offlinePusher = fcm.FcmClient offlinePusher = fcm.NewFcm()
} }
} }

View File

@ -47,6 +47,18 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ") 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.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
} }
var UIDList = []string{pushMsg.PushToUserID}
callbackResp := callbackOnlinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData)
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "OnlinePush callback Resp")
if callbackResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOnlinePush result: ", callbackResp)
}
if callbackResp.ActionCode != constant.ActionAllow {
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "OnlinePush stop")
return
}
//Online push message //Online push message
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String()) log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
for _, v := range grpcCons { for _, v := range grpcCons {
@ -75,9 +87,6 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
return return
} }
} }
//Use offline push messaging
var UIDList []string
UIDList = append(UIDList, pushMsg.PushToUserID)
customContent := OpenIMContent{ customContent := OpenIMContent{
SessionType: int(pushMsg.MsgData.SessionType), SessionType: int(pushMsg.MsgData.SessionType),
From: pushMsg.MsgData.SendID, From: pushMsg.MsgData.SendID,
@ -118,7 +127,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
} }
} }
callbackResp := callbackOfflinePush(pushMsg.OperationID, UIDList[0], pushMsg.MsgData) callbackResp := callbackOfflinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData)
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp") log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp")
if callbackResp.ErrCode != 0 { if callbackResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp) log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp)
@ -148,32 +157,49 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
var wsResult []*pbRelay.SingelMsgToUserResultList var wsResult []*pbRelay.SingelMsgToUserResultList
isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush) 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())
getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: pushMsg.OperationID, GroupID: pushMsg.MsgData.GroupID} var pushToUserIDList []string
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, pushMsg.OperationID) if config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.Enable {
if etcdConn == nil { callbackResp := callbackBeforeSuperGroupOnlinePush(pushMsg.OperationID, pushMsg.PushToUserID, pushMsg.MsgData, &pushToUserIDList)
errMsg := pushMsg.OperationID + "getcdv3.GetConn == nil" log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp")
log.NewError(pushMsg.OperationID, errMsg) if callbackResp.ErrCode != 0 {
return log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp)
} }
client := pbCache.NewCacheClient(etcdConn) if callbackResp.ActionCode != constant.ActionAllow {
cacheResp, err := client.GetGroupMemberIDListFromCache(context.Background(), getGroupMemberIDListFromCacheReq) log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "onlinePush stop")
if err != nil { return
log.NewError(pushMsg.OperationID, "GetGroupMemberIDListFromCache rpc call failed ", err.Error()) }
return log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "callback userIDList Resp", pushToUserIDList)
} } else {
if cacheResp.CommonResp.ErrCode != 0 { getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: pushMsg.OperationID, GroupID: pushMsg.MsgData.GroupID}
log.NewError(pushMsg.OperationID, "GetGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, pushMsg.OperationID)
return if etcdConn == nil {
errMsg := pushMsg.OperationID + "getcdv3.GetConn == nil"
log.NewError(pushMsg.OperationID, errMsg)
return
}
client := pbCache.NewCacheClient(etcdConn)
cacheResp, err := client.GetGroupMemberIDListFromCache(context.Background(), getGroupMemberIDListFromCacheReq)
if err != nil {
log.NewError(pushMsg.OperationID, "GetGroupMemberIDListFromCache rpc call failed ", err.Error())
return
}
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, "GetGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String())
return
}
pushToUserIDList = cacheResp.UserIDList
} }
if len(grpcCons) == 0 { if len(grpcCons) == 0 {
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ") 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.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
} }
//Online push message //Online push message
log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String()) log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
for _, v := range grpcCons { for _, v := range grpcCons {
msgClient := pbRelay.NewRelayClient(v) msgClient := pbRelay.NewRelayClient(v)
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: cacheResp.UserIDList}) reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: pushToUserIDList})
if err != nil { if err != nil {
log.NewError("push data to client rpc err", pushMsg.OperationID, "err", err) log.NewError("push data to client rpc err", pushMsg.OperationID, "err", err)
continue continue
@ -192,7 +218,7 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
onlineSuccessUserIDList = append(onlineSuccessUserIDList, v.UserID) onlineSuccessUserIDList = append(onlineSuccessUserIDList, v.UserID)
} }
} }
onlineFailedUserIDList := utils.DifferenceString(onlineSuccessUserIDList, cacheResp.UserIDList) onlineFailedUserIDList := utils.DifferenceString(onlineSuccessUserIDList, pushToUserIDList)
//Use offline push messaging //Use offline push messaging
customContent := OpenIMContent{ customContent := OpenIMContent{
SessionType: int(pushMsg.MsgData.SessionType), SessionType: int(pushMsg.MsgData.SessionType),
@ -234,7 +260,7 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
} }
} }
if len(onlineFailedUserIDList) > 0 { if len(onlineFailedUserIDList) > 0 {
callbackResp := callbackOfflinePush(pushMsg.OperationID, onlineFailedUserIDList[0], pushMsg.MsgData) callbackResp := callbackOfflinePush(pushMsg.OperationID, onlineFailedUserIDList, pushMsg.MsgData)
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp") log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline callback Resp")
if callbackResp.ErrCode != 0 { if callbackResp.ErrCode != 0 {
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp) log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "callbackOfflinePush result: ", callbackResp)

View File

@ -178,6 +178,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
resp.GroupInfo.OwnerUserID = req.OwnerUserID resp.GroupInfo.OwnerUserID = req.OwnerUserID
okUserIDList = append(okUserIDList, req.OwnerUserID) okUserIDList = append(okUserIDList, req.OwnerUserID)
} }
// superGroup stored in mongodb
} else { } else {
for _, v := range req.InitMemberList { for _, v := range req.InitMemberList {
okUserIDList = append(okUserIDList, v.UserID) okUserIDList = append(okUserIDList, v.UserID)
@ -186,20 +187,25 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
log.NewError(req.OperationID, "GetGroupMemberNumByGroupID failed ", err.Error(), groupId) log.NewError(req.OperationID, "GetGroupMemberNumByGroupID failed ", err.Error(), groupId)
resp.ErrCode = constant.ErrDB.ErrCode resp.ErrCode = constant.ErrDB.ErrCode
resp.ErrMsg = err.Error() + ": CreateSuperGroup failed" resp.ErrMsg = err.Error() + ": CreateSuperGroup failed"
} return resp, nil
}
for _, userID := range okUserIDList {
if err := rocksCache.DelJoinedGroupIDListFromCache(userID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), userID, err.Error())
} }
} }
if len(okUserIDList) != 0 { if len(okUserIDList) != 0 {
log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String())
if req.GroupInfo.GroupType != constant.SuperGroup { if req.GroupInfo.GroupType != constant.SuperGroup {
for _, userID := range okUserIDList {
if err := rocksCache.DelJoinedGroupIDListFromCache(userID); err != nil {
log.NewWarn(req.OperationID, utils.GetSelfFuncName(), userID, err.Error())
}
}
chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList) chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList)
} else { } else {
for _, userID := range okUserIDList {
if err := rocksCache.DelJoinedSuperGroupIDListFromCache(userID); err != nil {
log.NewWarn(req.OperationID, utils.GetSelfFuncName(), userID, err.Error())
}
}
go func() { go func() {
for _, v := range okUserIDList { for _, v := range okUserIDList {
chat.SuperGroupNotification(req.OperationID, v, v) chat.SuperGroupNotification(req.OperationID, v, v)
@ -274,7 +280,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID) groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err) log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err)
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}, nil
} }
if groupInfo.Status == constant.GroupStatusDismissed { if groupInfo.Status == constant.GroupStatusDismissed {
errMsg := " group status is dismissed " errMsg := " group status is dismissed "
@ -426,7 +432,6 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
log.NewError(req.OperationID, "AddUserToSuperGroup failed ", req.GroupID, err) log.NewError(req.OperationID, "AddUserToSuperGroup failed ", req.GroupID, err)
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}, nil return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}, nil
} }
} }
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
@ -449,19 +454,23 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil return &pbGroup.InviteUserToGroupResp{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)
}
}
if groupInfo.GroupType != constant.SuperGroup { if groupInfo.GroupType != constant.SuperGroup {
for _, userID := range okUserIDList {
err = rocksCache.DelJoinedGroupIDListFromCache(userID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
}
}
if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil { if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID) log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
} }
chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList) chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList)
} else { } else {
for _, v := range req.InvitedUserIDList {
if err := rocksCache.DelJoinedSuperGroupIDListFromCache(v); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
}
}
go func() { go func() {
for _, v := range req.InvitedUserIDList { for _, v := range req.InvitedUserIDList {
chat.SuperGroupNotification(req.OperationID, v, v) chat.SuperGroupNotification(req.OperationID, v, v)
@ -492,18 +501,9 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro
resp.ErrMsg = constant.ErrDB.ErrMsg resp.ErrMsg = constant.ErrDB.ErrMsg
return &resp, nil return &resp, nil
} }
//memberList, err := imdb.GetGroupMemberListByGroupID(req.GroupID)
//if err != nil {
// log.NewError(req.OperationID, "GetGroupMemberListByGroupID failed,", err.Error(), req.GroupID)
// resp.ErrCode = constant.ErrDB.ErrCode
// resp.ErrMsg = constant.ErrDB.ErrMsg
// return &resp, nil
//}
for _, v := range memberList { for _, v := range memberList {
var node open_im_sdk.GroupMemberFullInfo var node open_im_sdk.GroupMemberFullInfo
cp.GroupMemberDBCopyOpenIM(&node, v) cp.GroupMemberDBCopyOpenIM(&node, v)
//log.Debug(req.OperationID, "db value:", v.MuteEndTime, "seconds: ", v.MuteEndTime.Unix())
//log.Debug(req.OperationID, "cp value: ", node)
resp.MemberList = append(resp.MemberList, &node) resp.MemberList = append(resp.MemberList, &node)
} }
} }
@ -681,22 +681,24 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil return &pbGroup.KickGroupMemberResp{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)
}
}
if err = rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
}
if groupInfo.GroupType != constant.SuperGroup { if groupInfo.GroupType != constant.SuperGroup {
for _, userID := range okUserIDList {
err = rocksCache.DelJoinedGroupIDListFromCache(userID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
}
}
if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil { if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID) log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
} }
chat.MemberKickedNotification(req, okUserIDList) chat.MemberKickedNotification(req, okUserIDList)
} else { } else {
for _, userID := range okUserIDList {
err = rocksCache.DelJoinedSuperGroupIDListFromCache(userID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID)
}
}
go func() { go func() {
for _, v := range req.KickedUserIDList { for _, v := range req.KickedUserIDList {
chat.SuperGroupNotification(req.OperationID, v, v) chat.SuperGroupNotification(req.OperationID, v, v)
@ -711,24 +713,8 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) { func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) {
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
var resp pbGroup.GetGroupMembersInfoResp var resp pbGroup.GetGroupMembersInfoResp
resp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} resp.MemberList = []*open_im_sdk.GroupMemberFullInfo{}
//for _, v := range req.MemberList {
// var memberNode open_im_sdk.GroupMemberFullInfo
// memberInfo, err := imdb.GetMemberInfoByID(req.GroupID, v)
// memberNode.UserID = v
// if err != nil {
// log.NewError(req.OperationID, "GetMemberInfoById failed ", err.Error(), req.GroupID, v)
// continue
// } else {
// utils.CopyStructFields(&memberNode, memberInfo)
// memberNode.JoinTime = int32(memberInfo.JoinTime.Unix())
// resp.MemberList = append(resp.MemberList, &memberNode)
// }
//}
groupMembers, err := rocksCache.GetAllGroupMembersInfoFromCache(req.GroupID) groupMembers, err := rocksCache.GetAllGroupMembersInfoFromCache(req.GroupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error()) log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
@ -791,7 +777,6 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
groupsInfoList := make([]*open_im_sdk.GroupInfo, 0) groupsInfoList := make([]*open_im_sdk.GroupInfo, 0)
for _, groupID := range req.GroupIDList { for _, groupID := range req.GroupIDList {
//groupInfoFromMysql, err := imdb.GetGroupInfoByGroupID(groupID)
groupInfoFromRedis, err := rocksCache.GetGroupInfoFromCache(groupID) groupInfoFromRedis, err := rocksCache.GetGroupInfoFromCache(groupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID) log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID)
@ -1021,7 +1006,6 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
} }
//
//_, err = imdb.GetGroupMemberListByGroupIDAndRoleLevel(req.GroupID, constant.GroupOwner) //_, err = imdb.GetGroupMemberListByGroupIDAndRoleLevel(req.GroupID, constant.GroupOwner)
//if err != nil { //if err != nil {
// log.NewError(req.OperationID, "GetGroupMemberListByGroupIDAndRoleLevel failed ", err.Error(), req.GroupID, constant.GroupOwner) // log.NewError(req.OperationID, "GetGroupMemberListByGroupIDAndRoleLevel failed ", err.Error(), req.GroupID, constant.GroupOwner)
@ -1110,17 +1094,19 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
} }
if groupInfo.GroupType != constant.SuperGroup { 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)
}
chat.MemberQuitNotification(req) chat.MemberQuitNotification(req)
} else { } else {
if err := rocksCache.DelJoinedSuperGroupIDListFromCache(req.OpUserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.OpUserID)
}
chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.OpUserID) chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.OpUserID)
} }
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)
}
log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}) log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}})
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil
} }

View File

@ -2,47 +2,42 @@ package group
import ( import (
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db" rocksCache "Open_IM/pkg/common/db/rocks_cache"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
cp "Open_IM/pkg/common/utils" cp "Open_IM/pkg/common/utils"
pbGroup "Open_IM/pkg/proto/group" pbGroup "Open_IM/pkg/proto/group"
commonPb "Open_IM/pkg/proto/sdk_ws" commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"go.mongodb.org/mongo-driver/mongo"
) )
func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.GetJoinedSuperGroupListReq) (*pbGroup.GetJoinedSuperGroupListResp, error) { func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.GetJoinedSuperGroupListReq) (*pbGroup.GetJoinedSuperGroupListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbGroup.GetJoinedSuperGroupListResp{CommonResp: &pbGroup.CommonResp{}} resp := &pbGroup.GetJoinedSuperGroupListResp{CommonResp: &pbGroup.CommonResp{}}
userToSuperGroup, err := db.DB.GetSuperGroupByUserID(req.UserID) //userToSuperGroup, err := db.DB.GetSuperGroupByUserID(req.UserID)
if err == mongo.ErrNoDocuments { groupIDList, err := rocksCache.GetJoinedSuperGroupListFromCache(req.UserID)
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID failed ", err.Error(), req.UserID)
return resp, nil
}
if err != nil { if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID failed ", err.Error(), req.UserID) log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID failed ", err.Error(), req.UserID)
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil return resp, nil
} }
for _, groupID := range userToSuperGroup.GroupIDList { for _, groupID := range groupIDList {
groupInfoDB, err := imdb.GetGroupInfoByGroupID(groupID) groupInfoFromCache, err := rocksCache.GetGroupInfoFromCache(groupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupInfoByGroupID failed", groupID, err.Error()) log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupInfoByGroupID failed", groupID, err.Error())
continue continue
} }
groupInfo := &commonPb.GroupInfo{} groupInfo := &commonPb.GroupInfo{}
if err := utils.CopyStructFields(groupInfo, groupInfoDB); err != nil { if err := utils.CopyStructFields(groupInfo, groupInfoFromCache); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error()) log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
} }
group, err := db.DB.GetSuperGroup(groupID) groupMemberIDList, err := rocksCache.GetGroupMemberIDListFromCache(groupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroup failed", groupID, err.Error()) log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroup failed", groupID, err.Error())
continue continue
} }
groupInfo.MemberCount = uint32(len(group.MemberIDList)) groupInfo.MemberCount = uint32(len(groupMemberIDList))
resp.GroupList = append(resp.GroupList, groupInfo) resp.GroupList = append(resp.GroupList, groupInfo)
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
@ -54,13 +49,13 @@ func (s *groupServer) GetSuperGroupsInfo(_ context.Context, req *pbGroup.GetSupe
resp = &pbGroup.GetSuperGroupsInfoResp{CommonResp: &pbGroup.CommonResp{}} resp = &pbGroup.GetSuperGroupsInfoResp{CommonResp: &pbGroup.CommonResp{}}
groupsInfoList := make([]*commonPb.GroupInfo, 0) groupsInfoList := make([]*commonPb.GroupInfo, 0)
for _, groupID := range req.GroupIDList { for _, groupID := range req.GroupIDList {
groupInfoFromMysql, err := imdb.GetGroupInfoByGroupID(groupID) groupInfoFromRedis, err := rocksCache.GetGroupInfoFromCache(groupID)
if err != nil { if err != nil {
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID) log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID)
continue continue
} }
var groupInfo commonPb.GroupInfo var groupInfo commonPb.GroupInfo
cp.GroupDBCopyOpenIM(&groupInfo, groupInfoFromMysql) cp.GroupDBCopyOpenIM(&groupInfo, groupInfoFromRedis)
groupsInfoList = append(groupsInfoList, &groupInfo) groupsInfoList = append(groupsInfoList, &groupInfo)
} }
resp.GroupInfoList = groupsInfoList resp.GroupInfoList = groupsInfoList

View File

@ -53,7 +53,7 @@ func (rpc *rpcChat) SetMsgMinSeq(_ context.Context, req *pbChat.SetMsgMinSeqReq)
} }
return &pbChat.SetMsgMinSeqResp{}, nil return &pbChat.SetMsgMinSeqResp{}, nil
} }
err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, req.MinSeq) err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, uint64(req.MinSeq))
if err != nil { if err != nil {
errMsg := "SetGroupUserMinSeq failed " + err.Error() + req.OperationID + req.GroupID + req.UserID + utils.Uint32ToString(req.MinSeq) errMsg := "SetGroupUserMinSeq failed " + err.Error() + req.OperationID + req.GroupID + req.UserID + utils.Uint32ToString(req.MinSeq)
log.Error(req.OperationID, errMsg) log.Error(req.OperationID, errMsg)

View File

@ -2,8 +2,11 @@ package msg
import ( import (
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
commonPb "Open_IM/pkg/proto/sdk_ws" commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/proto/msg"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"time" "time"
@ -27,3 +30,27 @@ func (rpc *rpcChat) DelMsgList(_ context.Context, req *commonPb.DelMsgListReq) (
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil return resp, nil
} }
func (rpc *rpcChat) DelSuperGroupMsg(_ context.Context, req *msg.DelSuperGroupMsgReq) (*msg.DelSuperGroupMsgResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
if !token_verify.CheckAccess(req.OpUserID, req.UserID) {
log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.UserID)
return &msg.DelSuperGroupMsgResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil
}
resp := &msg.DelSuperGroupMsgResp{}
groupMaxSeq, err := db.DB.GetGroupMaxSeq(req.GroupID)
if err != nil {
log.NewError(req.OperationID, "GetGroupMaxSeq false ", req.OpUserID, req.UserID,req.GroupID)
resp.ErrCode = constant.ErrDB.ErrCode
resp.ErrMsg = err.Error()
return resp, nil
}
err = db.DB.SetGroupUserMinSeq(req.GroupID,req.UserID, groupMaxSeq)
if err != nil {
log.NewError(req.OperationID, "SetGroupUserMinSeq false ", req.OpUserID, req.UserID,req.GroupID)
resp.ErrCode = constant.ErrDB.ErrCode
resp.ErrMsg = err.Error()
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}

View File

@ -74,7 +74,7 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
if utils.IsContain(data.MsgData.SendID, config.Config.Manager.AppManagerUid) { if utils.IsContain(data.MsgData.SendID, config.Config.Manager.AppManagerUid) {
return true, 0, "", nil return true, 0, "", nil
} }
if data.MsgData.ContentType <= constant.FriendApplicationNotification && data.MsgData.ContentType >= constant.FriendApplicationApprovedNotification { if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
return true, 0, "", nil return true, 0, "", nil
} }
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify) log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)

View File

@ -52,6 +52,7 @@ type ManagementSendMsg struct {
ContentType int32 `json:"contentType" binding:"required"` ContentType int32 `json:"contentType" binding:"required"`
SessionType int32 `json:"sessionType" binding:"required"` SessionType int32 `json:"sessionType" binding:"required"`
IsOnlineOnly bool `json:"isOnlineOnly"` IsOnlineOnly bool `json:"isOnlineOnly"`
NotOfflinePush bool `json:"notOfflinePush"`
OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"`
} }
@ -73,10 +74,16 @@ type ManagementBatchSendMsgReq struct {
type ManagementBatchSendMsgResp struct { type ManagementBatchSendMsgResp struct {
CommResp CommResp
Data struct { Data struct {
ResultList []server_api_params.UserSendMsgResp `json:"resultList"` ResultList []*SingleReturnResult `json:"resultList"`
FailedIDList []string FailedIDList []string
} `json:"data"` } `json:"data"`
} }
type SingleReturnResult struct {
ServerMsgID string `json:"serverMsgID"`
ClientMsgID string `json:"clientMsgID"`
SendTime int64 `json:"sendTime"`
RecvID string `json:"recvID" `
}
type CheckMsgIsSendSuccessReq struct { type CheckMsgIsSendSuccessReq struct {
OperationID string `json:"operationID"` OperationID string `json:"operationID"`

View File

@ -12,6 +12,7 @@ type MiniostorageCredentialResp struct {
SessionToken string `json:"sessionToken"` SessionToken string `json:"sessionToken"`
BucketName string `json:"bucketName"` BucketName string `json:"bucketName"`
StsEndpointURL string `json:"stsEndpointURL"` StsEndpointURL string `json:"stsEndpointURL"`
StorageTime int `json:"storageTime"`
} }
type MinioUploadFileReq struct { type MinioUploadFileReq struct {

View File

@ -25,10 +25,19 @@ type CommonCallbackResp struct {
OperationID string `json:"operationID"` OperationID string `json:"operationID"`
} }
type UserStatusCallbackReq struct { type UserStatusBaseCallback struct {
CallbackCommand string `json:"callbackCommand"` CallbackCommand string `json:"callbackCommand"`
OperationID string `json:"operationID"` OperationID string `json:"operationID"`
UserID string `json:"userID"`
PlatformID int32 `json:"platformID"` PlatformID int32 `json:"platformID"`
Platform string `json:"platform"` Platform string `json:"platform"`
} }
type UserStatusCallbackReq struct {
UserStatusBaseCallback
UserID string `json:"userID"`
}
type UserStatusBatchCallbackReq struct {
UserStatusBaseCallback
UserIDList []string `json:"userIDList"`
}

View File

@ -2,18 +2,33 @@ package call_back_struct
import commonPb "Open_IM/pkg/proto/sdk_ws" import commonPb "Open_IM/pkg/proto/sdk_ws"
type CallbackOfflinePushReq struct { type CallbackBeforePushReq struct {
UserStatusCallbackReq UserStatusBatchCallbackReq
*commonPb.OfflinePushInfo *commonPb.OfflinePushInfo
//CommonCallbackReq
SendID string `json:"sendID"` SendID string `json:"sendID"`
GroupID string `json:"groupID"` GroupID string `json:"groupID"`
ContentType int32 `json:"contentType"` ContentType int32 `json:"contentType"`
SessionType int32 `json:"sessionType"` SessionType int32 `json:"sessionType"`
AtUserIDList []string `json:"atUserIDList"` AtUserIDList []string `json:"atUserIDList"`
Content string `json` Content string `json:"content"`
} }
type CallbackOfflinePushResp struct { type CallbackBeforePushResp struct {
*CommonCallbackResp *CommonCallbackResp
} }
type CallbackBeforeSuperGroupOnlinePushReq struct {
*commonPb.OfflinePushInfo
UserStatusBaseCallback
SendID string `json:"sendID"`
GroupID string `json:"groupID"`
ContentType int32 `json:"contentType"`
SessionType int32 `json:"sessionType"`
AtUserIDList []string `json:"atUserIDList"`
Content string `json:"content"`
}
type CallbackBeforeSuperGroupOnlinePushResp struct {
*CommonCallbackResp
UserIDList []string `json:"userIDList"`
}

View File

@ -71,6 +71,7 @@ type config struct {
SecretAccessKey string `yaml:"secretAccessKey"` SecretAccessKey string `yaml:"secretAccessKey"`
EndpointInner string `yaml:"endpointInner"` EndpointInner string `yaml:"endpointInner"`
EndpointInnerEnable bool `yaml:"endpointInnerEnable"` EndpointInnerEnable bool `yaml:"endpointInnerEnable"`
StorageTime int `yaml:"storageTime"`
} `yaml:"minio"` } `yaml:"minio"`
} }
@ -253,15 +254,17 @@ type config struct {
} }
Callback struct { Callback struct {
CallbackUrl string `yaml:"callbackUrl"` CallbackUrl string `yaml:"callbackUrl"`
CallbackBeforeSendSingleMsg callBackConfig `yaml:"callbackBeforeSendSingleMsg"` CallbackBeforeSendSingleMsg callBackConfig `yaml:"callbackBeforeSendSingleMsg"`
CallbackAfterSendSingleMsg callBackConfig `yaml:"callbackAfterSendSingleMsg"` CallbackAfterSendSingleMsg callBackConfig `yaml:"callbackAfterSendSingleMsg"`
CallbackBeforeSendGroupMsg callBackConfig `yaml:"callbackBeforeSendGroupMsg"` CallbackBeforeSendGroupMsg callBackConfig `yaml:"callbackBeforeSendGroupMsg"`
CallbackAfterSendGroupMsg callBackConfig `yaml:"callbackAfterSendGroupMsg"` CallbackAfterSendGroupMsg callBackConfig `yaml:"callbackAfterSendGroupMsg"`
CallbackWordFilter callBackConfig `yaml:"callbackWordFilter"` CallbackWordFilter callBackConfig `yaml:"callbackWordFilter"`
CallbackUserOnline callBackConfig `yaml:"callbackUserOnline"` CallbackUserOnline callBackConfig `yaml:"callbackUserOnline"`
CallbackUserOffline callBackConfig `yaml:"callbackUserOffline"` CallbackUserOffline callBackConfig `yaml:"callbackUserOffline"`
CallbackOfflinePush callBackConfig `yaml:"callbackOfflinePush"` CallbackOfflinePush callBackConfig `yaml:"callbackOfflinePush"`
CallbackOnlinePush callBackConfig `yaml:"callbackOnlinePush"`
CallbackBeforeSuperGroupOnlinePush callBackConfig `yaml:"callbackSuperGroupOnlinePush"`
} `yaml:"callback"` } `yaml:"callback"`
Notification struct { Notification struct {
///////////////////////group///////////////////////////// ///////////////////////group/////////////////////////////

View File

@ -28,25 +28,25 @@ const (
///ContentType ///ContentType
//UserRelated //UserRelated
Text = 101 Text = 101
Picture = 102 Picture = 102
Voice = 103 Voice = 103
Video = 104 Video = 104
File = 105 File = 105
AtText = 106 AtText = 106
Merger = 107 Merger = 107
Card = 108 Card = 108
Location = 109 Location = 109
Custom = 110 Custom = 110
Revoke = 111 Revoke = 111
HasReadReceipt = 112 HasReadReceipt = 112
Typing = 113 Typing = 113
Quote = 114 Quote = 114
GroupHasReadReceipt = 116 GroupHasReadReceipt = 116
AdvancedText = 117 AdvancedText = 117
AdvancedRevoke = 118 //影响前者消息 AdvancedRevoke = 118 //影响前者消息
CustomMsgNotTriggerConversation = 119 CustomNotTriggerConversation = 119
CustomMsgOnlineOnly = 120 CustomOnlineOnly = 120
Common = 200 Common = 200
GroupMsg = 201 GroupMsg = 201
@ -192,14 +192,16 @@ const (
VerificationCodeForResetSuffix = "_forReset" VerificationCodeForResetSuffix = "_forReset"
//callbackCommand //callbackCommand
CallbackBeforeSendSingleMsgCommand = "callbackBeforeSendSingleMsgCommand" CallbackBeforeSendSingleMsgCommand = "callbackBeforeSendSingleMsgCommand"
CallbackAfterSendSingleMsgCommand = "callbackAfterSendSingleMsgCommand" CallbackAfterSendSingleMsgCommand = "callbackAfterSendSingleMsgCommand"
CallbackBeforeSendGroupMsgCommand = "callbackBeforeSendGroupMsgCommand" CallbackBeforeSendGroupMsgCommand = "callbackBeforeSendGroupMsgCommand"
CallbackAfterSendGroupMsgCommand = "callbackAfterSendGroupMsgCommand" CallbackAfterSendGroupMsgCommand = "callbackAfterSendGroupMsgCommand"
CallbackWordFilterCommand = "callbackWordFilterCommand" CallbackWordFilterCommand = "callbackWordFilterCommand"
CallbackUserOnlineCommand = "callbackUserOnlineCommand" CallbackUserOnlineCommand = "callbackUserOnlineCommand"
CallbackUserOfflineCommand = "callbackUserOfflineCommand" CallbackUserOfflineCommand = "callbackUserOfflineCommand"
CallbackOfflinePushCommand = "callbackOfflinePushCommand" CallbackOfflinePushCommand = "callbackOfflinePushCommand"
CallbackOnlinePushCommand = "callbackOnlinePushCommand"
CallbackSuperGroupOnlinePushCommand = "callbackSuperGroupOnlinePushCommand"
//callback actionCode //callback actionCode
ActionAllow = 0 ActionAllow = 0
ActionForbidden = 1 ActionForbidden = 1

View File

@ -88,7 +88,7 @@ func (d *DataBases) GetUserMinSeq(uid string) (uint64, error) {
return uint64(utils.StringToInt(seq)), err return uint64(utils.StringToInt(seq)), err
} }
func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint32) (err error) { func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint64) (err error) {
key := groupUserMinSeq + "g:" + groupID + "u:" + userID key := groupUserMinSeq + "g:" + groupID + "u:" + userID
return d.RDB.Set(context.Background(), key, minSeq, 0).Err() return d.RDB.Set(context.Background(), key, minSeq, 0).Err()
} }
@ -221,6 +221,19 @@ func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string,
_, err := pipe.Exec(ctx) _, err := pipe.Exec(ctx)
return err return err
} }
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, keys...).Err()
if err != nil {
log2.NewWarn(operationID, utils.GetSelfFuncName(), "redis failed", "args:", keys, uid, err.Error(), msgList)
}
return err
}
func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error { func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error {
ctx := context.Background() ctx := context.Background()

View File

@ -147,21 +147,11 @@ func init() {
} }
} }
// 强一致性缓存当一个key被标记删除其他请求线程会被锁住轮询直到新的key生成适合各种同步的拉取, 如果弱一致可能导致拉取还是老数据,毫无意义 // 强一致性缓存当一个key被标记删除其他请求线程会被锁住轮询直到新的key生成适合各种同步的拉取, 如果弱一致可能导致拉取还是老数据,毫无意义
DB.Rc = rockscache.NewClient(go_redis.NewClient(&go_redis.Options{ DB.Rc = rockscache.NewClient(DB.RDB, rockscache.NewDefaultOptions())
Addr: config.Config.Redis.DBAddress[0],
Password: config.Config.Redis.DBPassWord, // no password set
DB: 0, // use default DB
PoolSize: 100, // 连接池大小
}), rockscache.NewDefaultOptions())
DB.Rc.Options.StrongConsistency = true DB.Rc.Options.StrongConsistency = true
// 弱一致性缓存当一个key被标记删除其他请求线程直接返回该key的value适合高频并且生成很缓存很慢的情况 如大群发消息缓存的缓存 // 弱一致性缓存当一个key被标记删除其他请求线程直接返回该key的value适合高频并且生成很缓存很慢的情况 如大群发消息缓存的缓存
DB.WeakRc = rockscache.NewClient(go_redis.NewClient(&go_redis.Options{ DB.WeakRc = rockscache.NewClient(DB.RDB, rockscache.NewDefaultOptions())
Addr: config.Config.Redis.DBAddress[0],
Password: config.Config.Redis.DBPassWord, // no password set
DB: 0, // use default DB
PoolSize: 100, // 连接池大小
}), rockscache.NewDefaultOptions())
DB.WeakRc.Options.StrongConsistency = false DB.WeakRc.Options.StrongConsistency = false
} }

View File

@ -908,8 +908,8 @@ func (d *DataBases) GetUserWorkMoments(opUserID, userID string, showNumber, page
result, err := c.Find(ctx, bson.D{ // 等价条件: select * from result, err := c.Find(ctx, bson.D{ // 等价条件: select * from
{"user_id", userID}, {"user_id", userID},
{"$or", bson.A{ {"$or", bson.A{
bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{userID}}}}}, bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{opUserID}}}}},
bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{userID}}}}}, bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{opUserID}}}}},
bson.D{{"permission", constant.WorkMomentPublic}}, bson.D{{"permission", constant.WorkMomentPublic}},
}}, }},
}, findOpts) }, findOpts)
@ -970,7 +970,7 @@ func (d *DataBases) CreateSuperGroup(groupID string, initMemberIDList []string,
} }
_, err = c.InsertOne(sCtx, superGroup) _, err = c.InsertOne(sCtx, superGroup)
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
var users []UserToSuperGroup var users []UserToSuperGroup
@ -992,7 +992,7 @@ func (d *DataBases) CreateSuperGroup(groupID string, initMemberIDList []string,
for _, userID := range initMemberIDList { for _, userID := range initMemberIDList {
_, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts) _, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts)
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
@ -1022,7 +1022,7 @@ func (d *DataBases) AddUserToSuperGroup(groupID string, userIDList []string) err
} }
_, err = c.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$addToSet": bson.M{"member_id_list": bson.M{"$each": userIDList}}}) _, err = c.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$addToSet": bson.M{"member_id_list": bson.M{"$each": userIDList}}})
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
c = d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) c = d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup)
@ -1039,11 +1039,11 @@ func (d *DataBases) AddUserToSuperGroup(groupID string, userIDList []string) err
for _, userID := range userIDList { for _, userID := range userIDList {
_, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts) _, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts)
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
} }
session.CommitTransaction(ctx) _ = session.CommitTransaction(ctx)
return err return err
} }
@ -1058,15 +1058,15 @@ func (d *DataBases) RemoverUserFromSuperGroup(groupID string, userIDList []strin
sCtx := mongo.NewSessionContext(ctx, session) sCtx := mongo.NewSessionContext(ctx, session)
_, err = c.UpdateOne(ctx, bson.M{"group_id": groupID}, bson.M{"$pull": bson.M{"member_id_list": bson.M{"$in": userIDList}}}) _, err = c.UpdateOne(ctx, bson.M{"group_id": groupID}, bson.M{"$pull": bson.M{"member_id_list": bson.M{"$in": userIDList}}})
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
err = d.RemoveGroupFromUser(ctx, sCtx, groupID, userIDList) err = d.RemoveGroupFromUser(ctx, sCtx, groupID, userIDList)
if err != nil { if err != nil {
session.AbortTransaction(ctx) _ = session.AbortTransaction(ctx)
return utils.Wrap(err, "transaction failed") return utils.Wrap(err, "transaction failed")
} }
session.CommitTransaction(ctx) _ = session.CommitTransaction(ctx)
return err return err
} }

View File

@ -1,6 +1,7 @@
package rocksCache package rocksCache
import ( import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db" "Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
@ -12,18 +13,19 @@ import (
) )
const ( const (
userInfoCache = "USER_INFO_CACHE:" userInfoCache = "USER_INFO_CACHE:"
friendRelationCache = "FRIEND_RELATION_CACHE:" friendRelationCache = "FRIEND_RELATION_CACHE:"
blackListCache = "BLACK_LIST_CACHE:" blackListCache = "BLACK_LIST_CACHE:"
groupCache = "GROUP_CACHE:" groupCache = "GROUP_CACHE:"
groupInfoCache = "GROUP_INFO_CACHE:" groupInfoCache = "GROUP_INFO_CACHE:"
groupOwnerIDCache = "GROUP_OWNER_ID:" groupOwnerIDCache = "GROUP_OWNER_ID:"
joinedGroupListCache = "JOINED_GROUP_LIST_CACHE:" joinedGroupListCache = "JOINED_GROUP_LIST_CACHE:"
groupMemberInfoCache = "GROUP_MEMBER_INFO_CACHE:" groupMemberInfoCache = "GROUP_MEMBER_INFO_CACHE:"
groupAllMemberInfoCache = "GROUP_ALL_MEMBER_INFO_CACHE:" groupAllMemberInfoCache = "GROUP_ALL_MEMBER_INFO_CACHE:"
allFriendInfoCache = "ALL_FRIEND_INFO_CACHE:" allFriendInfoCache = "ALL_FRIEND_INFO_CACHE:"
allDepartmentCache = "ALL_DEPARTMENT_CACHE:" allDepartmentCache = "ALL_DEPARTMENT_CACHE:"
allDepartmentMemberCache = "ALL_DEPARTMENT_MEMBER_CACHE:" allDepartmentMemberCache = "ALL_DEPARTMENT_MEMBER_CACHE:"
joinedSuperGroupListCache = "JOINED_SUPER_GROUP_LIST_CACHE:"
) )
func init() { func init() {
@ -41,13 +43,7 @@ func init() {
panic(err.Error()) panic(err.Error())
} }
n += len(keys) n += len(keys)
//fmt.Printf("\n %s key found %d keys: %v, current cursor %d\n", key, n, keys, cursor) // for each for redis cluster
//if len(keys) > 0 {
// err = db.DB.RDB.Del(context.Background(), keys...).Err()
// if err != nil {
// panic(err.Error())
// }
//}
for _, key := range keys { for _, key := range keys {
if err = db.DB.RDB.Del(context.Background(), key).Err(); err != nil { if err = db.DB.RDB.Del(context.Background(), key).Err(); err != nil {
log.NewError("", fName, key, err.Error()) log.NewError("", fName, key, err.Error())
@ -132,15 +128,28 @@ func DelJoinedGroupIDListFromCache(userID string) error {
} }
func GetGroupMemberIDListFromCache(groupID string) ([]string, error) { func GetGroupMemberIDListFromCache(groupID string) ([]string, error) {
getGroupMemberIDList := func() (string, error) { f := func() (string, error) {
groupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(groupID) groupInfo, err := GetGroupInfoFromCache(groupID)
if err != nil { if err != nil {
return "", utils.Wrap(err, "") return "", utils.Wrap(err, "GetGroupInfoFromCache failed")
}
var groupMemberIDList []string
if groupInfo.GroupType == constant.SuperGroup {
superGroup, err := db.DB.GetSuperGroup(groupID)
if err != nil {
return "", utils.Wrap(err, "")
}
groupMemberIDList = superGroup.MemberIDList
} else {
groupMemberIDList, err = imdb.GetGroupMemberIDListByGroupID(groupID)
if err != nil {
return "", utils.Wrap(err, "")
}
} }
bytes, err := json.Marshal(groupMemberIDList) bytes, err := json.Marshal(groupMemberIDList)
return string(bytes), utils.Wrap(err, "") return string(bytes), utils.Wrap(err, "")
} }
groupIDListStr, err := db.DB.Rc.Fetch(groupCache+groupID, time.Second*30*60, getGroupMemberIDList) groupIDListStr, err := db.DB.Rc.Fetch(groupCache+groupID, time.Second*30*60, f)
if err != nil { if err != nil {
return nil, utils.Wrap(err, "") return nil, utils.Wrap(err, "")
} }
@ -149,8 +158,8 @@ func GetGroupMemberIDListFromCache(groupID string) ([]string, error) {
return groupMemberIDList, utils.Wrap(err, "") return groupMemberIDList, utils.Wrap(err, "")
} }
func DelGroupMemberIDListFromCache(userID string) error { func DelGroupMemberIDListFromCache(groupID string) error {
err := db.DB.Rc.TagAsDeleted(groupCache + userID) err := db.DB.Rc.TagAsDeleted(groupCache + groupID)
return err return err
} }
@ -307,3 +316,31 @@ func GetAllDepartmentMembersFromCache() ([]db.DepartmentMember, error) {
func DelAllDepartmentMembersFromCache() error { func DelAllDepartmentMembersFromCache() error {
return db.DB.Rc.TagAsDeleted(allDepartmentMemberCache) return db.DB.Rc.TagAsDeleted(allDepartmentMemberCache)
} }
func GetJoinedSuperGroupListFromCache(userID string) ([]string, error) {
getJoinedSuperGroupIDList := func() (string, error) {
userToSuperGroup, err := db.DB.GetSuperGroupByUserID(userID)
if err != nil {
return "", utils.Wrap(err, "")
}
bytes, err := json.Marshal(userToSuperGroup.GroupIDList)
return string(bytes), utils.Wrap(err, "")
}
joinedSuperGroupListStr, err := db.DB.Rc.Fetch(joinedSuperGroupListCache+userID, time.Second, getJoinedSuperGroupIDList)
var joinedSuperGroupList []string
err = json.Unmarshal([]byte(joinedSuperGroupListStr), &joinedSuperGroupList)
return joinedSuperGroupList, err
}
func DelJoinedSuperGroupIDListFromCache(userID string) error {
err := db.DB.Rc.TagAsDeleted(joinedSuperGroupListCache + userID)
return err
}
func GetSuperGroupMemberIDListFromCache(groupID string) ([]string, error) {
return GetGroupMemberIDListFromCache(groupID)
}
func DelSuperGroupMemberIDListFromCache(groupID string) error {
return DelGroupMemberIDListFromCache(groupID)
}

View File

@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} }
func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) }
func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) ProtoMessage() {}
func (*MsgDataToMQ) Descriptor() ([]byte, []int) { func (*MsgDataToMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{0} return fileDescriptor_msg_110411abaacf415d, []int{0}
} }
func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b)
@ -90,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} }
func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) }
func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) ProtoMessage() {}
func (*MsgDataToDB) Descriptor() ([]byte, []int) { func (*MsgDataToDB) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{1} return fileDescriptor_msg_110411abaacf415d, []int{1}
} }
func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b)
@ -137,7 +137,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} }
func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) }
func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) ProtoMessage() {}
func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{2} return fileDescriptor_msg_110411abaacf415d, []int{2}
} }
func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b)
@ -192,7 +192,7 @@ func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} }
func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) } func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) }
func (*MsgDataToMongoByMQ) ProtoMessage() {} func (*MsgDataToMongoByMQ) ProtoMessage() {}
func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{3} return fileDescriptor_msg_110411abaacf415d, []int{3}
} }
func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error { func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b) return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b)
@ -272,7 +272,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) ProtoMessage() {}
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{4} return fileDescriptor_msg_110411abaacf415d, []int{4}
} }
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
@ -320,7 +320,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) ProtoMessage() {}
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{5} return fileDescriptor_msg_110411abaacf415d, []int{5}
} }
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
@ -381,7 +381,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} }
func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) }
func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) ProtoMessage() {}
func (*SendMsgReq) Descriptor() ([]byte, []int) { func (*SendMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{6} return fileDescriptor_msg_110411abaacf415d, []int{6}
} }
func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { func (m *SendMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) return xxx_messageInfo_SendMsgReq.Unmarshal(m, b)
@ -437,7 +437,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} }
func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) }
func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) ProtoMessage() {}
func (*SendMsgResp) Descriptor() ([]byte, []int) { func (*SendMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{7} return fileDescriptor_msg_110411abaacf415d, []int{7}
} }
func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { func (m *SendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) return xxx_messageInfo_SendMsgResp.Unmarshal(m, b)
@ -505,7 +505,7 @@ func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} }
func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) } func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) }
func (*ClearMsgReq) ProtoMessage() {} func (*ClearMsgReq) ProtoMessage() {}
func (*ClearMsgReq) Descriptor() ([]byte, []int) { func (*ClearMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{8} return fileDescriptor_msg_110411abaacf415d, []int{8}
} }
func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error { func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b) return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b)
@ -558,7 +558,7 @@ func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} }
func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) } func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) }
func (*ClearMsgResp) ProtoMessage() {} func (*ClearMsgResp) ProtoMessage() {}
func (*ClearMsgResp) Descriptor() ([]byte, []int) { func (*ClearMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{9} return fileDescriptor_msg_110411abaacf415d, []int{9}
} }
func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error { func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b) return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b)
@ -607,7 +607,7 @@ func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} }
func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) } func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*SetMsgMinSeqReq) ProtoMessage() {} func (*SetMsgMinSeqReq) ProtoMessage() {}
func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{10} return fileDescriptor_msg_110411abaacf415d, []int{10}
} }
func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error { func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b) return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b)
@ -674,7 +674,7 @@ func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} }
func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) } func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*SetMsgMinSeqResp) ProtoMessage() {} func (*SetMsgMinSeqResp) ProtoMessage() {}
func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{11} return fileDescriptor_msg_110411abaacf415d, []int{11}
} }
func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error { func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b) return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b)
@ -719,7 +719,7 @@ func (m *SetSendMsgFailedFlagReq) Reset() { *m = SetSendMsgFailedFlagReq
func (m *SetSendMsgFailedFlagReq) String() string { return proto.CompactTextString(m) } func (m *SetSendMsgFailedFlagReq) String() string { return proto.CompactTextString(m) }
func (*SetSendMsgFailedFlagReq) ProtoMessage() {} func (*SetSendMsgFailedFlagReq) ProtoMessage() {}
func (*SetSendMsgFailedFlagReq) Descriptor() ([]byte, []int) { func (*SetSendMsgFailedFlagReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{12} return fileDescriptor_msg_110411abaacf415d, []int{12}
} }
func (m *SetSendMsgFailedFlagReq) XXX_Unmarshal(b []byte) error { func (m *SetSendMsgFailedFlagReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetSendMsgFailedFlagReq.Unmarshal(m, b) return xxx_messageInfo_SetSendMsgFailedFlagReq.Unmarshal(m, b)
@ -758,7 +758,7 @@ func (m *SetSendMsgFailedFlagResp) Reset() { *m = SetSendMsgFailedFlagRe
func (m *SetSendMsgFailedFlagResp) String() string { return proto.CompactTextString(m) } func (m *SetSendMsgFailedFlagResp) String() string { return proto.CompactTextString(m) }
func (*SetSendMsgFailedFlagResp) ProtoMessage() {} func (*SetSendMsgFailedFlagResp) ProtoMessage() {}
func (*SetSendMsgFailedFlagResp) Descriptor() ([]byte, []int) { func (*SetSendMsgFailedFlagResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{13} return fileDescriptor_msg_110411abaacf415d, []int{13}
} }
func (m *SetSendMsgFailedFlagResp) XXX_Unmarshal(b []byte) error { func (m *SetSendMsgFailedFlagResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetSendMsgFailedFlagResp.Unmarshal(m, b) return xxx_messageInfo_SetSendMsgFailedFlagResp.Unmarshal(m, b)
@ -803,7 +803,7 @@ func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} }
func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) }
func (*GetSendMsgStatusReq) ProtoMessage() {} func (*GetSendMsgStatusReq) ProtoMessage() {}
func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{14} return fileDescriptor_msg_110411abaacf415d, []int{14}
} }
func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b) return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b)
@ -843,7 +843,7 @@ func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} }
func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) }
func (*GetSendMsgStatusResp) ProtoMessage() {} func (*GetSendMsgStatusResp) ProtoMessage() {}
func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_b3ce531eb8197ddf, []int{15} return fileDescriptor_msg_110411abaacf415d, []int{15}
} }
func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b) return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b)
@ -884,6 +884,114 @@ func (m *GetSendMsgStatusResp) GetStatus() int32 {
return 0 return 0
} }
type DelSuperGroupMsgReq struct {
OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,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 *DelSuperGroupMsgReq) Reset() { *m = DelSuperGroupMsgReq{} }
func (m *DelSuperGroupMsgReq) String() string { return proto.CompactTextString(m) }
func (*DelSuperGroupMsgReq) ProtoMessage() {}
func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_110411abaacf415d, []int{16}
}
func (m *DelSuperGroupMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelSuperGroupMsgReq.Unmarshal(m, b)
}
func (m *DelSuperGroupMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DelSuperGroupMsgReq.Marshal(b, m, deterministic)
}
func (dst *DelSuperGroupMsgReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_DelSuperGroupMsgReq.Merge(dst, src)
}
func (m *DelSuperGroupMsgReq) XXX_Size() int {
return xxx_messageInfo_DelSuperGroupMsgReq.Size(m)
}
func (m *DelSuperGroupMsgReq) XXX_DiscardUnknown() {
xxx_messageInfo_DelSuperGroupMsgReq.DiscardUnknown(m)
}
var xxx_messageInfo_DelSuperGroupMsgReq proto.InternalMessageInfo
func (m *DelSuperGroupMsgReq) GetOpUserID() string {
if m != nil {
return m.OpUserID
}
return ""
}
func (m *DelSuperGroupMsgReq) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
func (m *DelSuperGroupMsgReq) GetGroupID() string {
if m != nil {
return m.GroupID
}
return ""
}
func (m *DelSuperGroupMsgReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type DelSuperGroupMsgResp 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:"-"`
}
func (m *DelSuperGroupMsgResp) Reset() { *m = DelSuperGroupMsgResp{} }
func (m *DelSuperGroupMsgResp) String() string { return proto.CompactTextString(m) }
func (*DelSuperGroupMsgResp) ProtoMessage() {}
func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_110411abaacf415d, []int{17}
}
func (m *DelSuperGroupMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelSuperGroupMsgResp.Unmarshal(m, b)
}
func (m *DelSuperGroupMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DelSuperGroupMsgResp.Marshal(b, m, deterministic)
}
func (dst *DelSuperGroupMsgResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_DelSuperGroupMsgResp.Merge(dst, src)
}
func (m *DelSuperGroupMsgResp) XXX_Size() int {
return xxx_messageInfo_DelSuperGroupMsgResp.Size(m)
}
func (m *DelSuperGroupMsgResp) XXX_DiscardUnknown() {
xxx_messageInfo_DelSuperGroupMsgResp.DiscardUnknown(m)
}
var xxx_messageInfo_DelSuperGroupMsgResp proto.InternalMessageInfo
func (m *DelSuperGroupMsgResp) GetErrCode() int32 {
if m != nil {
return m.ErrCode
}
return 0
}
func (m *DelSuperGroupMsgResp) GetErrMsg() string {
if m != nil {
return m.ErrMsg
}
return ""
}
func init() { func init() {
proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ") proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ")
proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB") proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB")
@ -901,6 +1009,8 @@ func init() {
proto.RegisterType((*SetSendMsgFailedFlagResp)(nil), "msg.SetSendMsgFailedFlagResp") proto.RegisterType((*SetSendMsgFailedFlagResp)(nil), "msg.SetSendMsgFailedFlagResp")
proto.RegisterType((*GetSendMsgStatusReq)(nil), "msg.GetSendMsgStatusReq") proto.RegisterType((*GetSendMsgStatusReq)(nil), "msg.GetSendMsgStatusReq")
proto.RegisterType((*GetSendMsgStatusResp)(nil), "msg.GetSendMsgStatusResp") proto.RegisterType((*GetSendMsgStatusResp)(nil), "msg.GetSendMsgStatusResp")
proto.RegisterType((*DelSuperGroupMsgReq)(nil), "msg.DelSuperGroupMsgReq")
proto.RegisterType((*DelSuperGroupMsgResp)(nil), "msg.DelSuperGroupMsgResp")
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -918,6 +1028,7 @@ type MsgClient interface {
PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error)
SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error)
DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error)
DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error)
ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error)
SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error)
SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error) SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error)
@ -968,6 +1079,15 @@ func (c *msgClient) DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, op
return out, nil return out, nil
} }
func (c *msgClient) DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) {
out := new(DelSuperGroupMsgResp)
err := grpc.Invoke(ctx, "/msg.msg/DelSuperGroupMsg", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) { func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) {
out := new(ClearMsgResp) out := new(ClearMsgResp)
err := grpc.Invoke(ctx, "/msg.msg/ClearMsg", in, out, c.cc, opts...) err := grpc.Invoke(ctx, "/msg.msg/ClearMsg", in, out, c.cc, opts...)
@ -1011,6 +1131,7 @@ type MsgServer interface {
PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error)
SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error)
DelMsgList(context.Context, *sdk_ws.DelMsgListReq) (*sdk_ws.DelMsgListResp, error) DelMsgList(context.Context, *sdk_ws.DelMsgListReq) (*sdk_ws.DelMsgListResp, error)
DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error)
ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error)
SetMsgMinSeq(context.Context, *SetMsgMinSeqReq) (*SetMsgMinSeqResp, error) SetMsgMinSeq(context.Context, *SetMsgMinSeqReq) (*SetMsgMinSeqResp, error)
SetSendMsgFailedFlag(context.Context, *SetSendMsgFailedFlagReq) (*SetSendMsgFailedFlagResp, error) SetSendMsgFailedFlag(context.Context, *SetSendMsgFailedFlagReq) (*SetSendMsgFailedFlagResp, error)
@ -1093,6 +1214,24 @@ func _Msg_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(inte
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Msg_DelSuperGroupMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DelSuperGroupMsgReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).DelSuperGroupMsg(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/msg.msg/DelSuperGroupMsg",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).DelSuperGroupMsg(ctx, req.(*DelSuperGroupMsgReq))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClearMsgReq) in := new(ClearMsgReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -1185,6 +1324,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "DelMsgList", MethodName: "DelMsgList",
Handler: _Msg_DelMsgList_Handler, Handler: _Msg_DelMsgList_Handler,
}, },
{
MethodName: "DelSuperGroupMsg",
Handler: _Msg_DelSuperGroupMsg_Handler,
},
{ {
MethodName: "ClearMsg", MethodName: "ClearMsg",
Handler: _Msg_ClearMsg_Handler, Handler: _Msg_ClearMsg_Handler,
@ -1206,58 +1349,62 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
Metadata: "msg/msg.proto", Metadata: "msg/msg.proto",
} }
func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_b3ce531eb8197ddf) } func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_110411abaacf415d) }
var fileDescriptor_msg_b3ce531eb8197ddf = []byte{ var fileDescriptor_msg_110411abaacf415d = []byte{
// 793 bytes of a gzipped FileDescriptorProto // 850 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6e, 0xfb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x55,
0x10, 0x96, 0x9b, 0x7f, 0xbf, 0x8c, 0x5b, 0x25, 0x2c, 0xa1, 0x18, 0xab, 0x48, 0xa9, 0x05, 0x28, 0x10, 0xd7, 0xc6, 0xb1, 0xd3, 0xcc, 0x26, 0xb2, 0x79, 0x35, 0x61, 0x59, 0x15, 0xc9, 0x5d, 0x01,
0x02, 0x94, 0x48, 0x01, 0x89, 0x43, 0x2f, 0x90, 0xa6, 0xad, 0x2a, 0xd5, 0xb4, 0xb5, 0xcb, 0x85, 0xb2, 0x00, 0xd9, 0x92, 0x41, 0xe2, 0x90, 0x0b, 0xb8, 0x6e, 0x43, 0xa4, 0x2e, 0x6d, 0x76, 0xc3,
0x4b, 0x6a, 0x9a, 0xd5, 0xd6, 0xaa, 0xff, 0x6c, 0x3c, 0x0e, 0x6d, 0xe1, 0x19, 0x78, 0x00, 0x4e, 0x85, 0x8b, 0xbb, 0xd4, 0x4f, 0xaf, 0xab, 0xec, 0xc7, 0xf3, 0xce, 0x9a, 0xb4, 0x70, 0xe6, 0xc8,
0xdc, 0x78, 0x33, 0xde, 0x03, 0xed, 0xae, 0x93, 0xd8, 0x89, 0xa1, 0x51, 0x0e, 0xbf, 0xe3, 0xf7, 0x1f, 0xc0, 0x89, 0x1b, 0x47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, 0xc7, 0xc8, 0x7e, 0xe9,
0xc8, 0x3f, 0xc9, 0xaf, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xcc, 0x3b, 0xac, 0x82, 0x0a,
0x00, 0x00,
} }

View File

@ -120,12 +120,22 @@ message GetSendMsgStatusResp{
string errMsg = 2; string errMsg = 2;
int32 status = 3; int32 status = 3;
} }
message DelSuperGroupMsgReq{
string opUserID = 1;
string userID = 2;
string groupID = 3;
string operationID = 4;
}
message DelSuperGroupMsgResp{
int32 errCode = 1;
string errMsg = 2;
}
service msg { service msg {
rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp); rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp);
rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp);
rpc SendMsg(SendMsgReq) returns(SendMsgResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp);
rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp); rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp);
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp); rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp); rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp);
rpc SetSendMsgFailedFlag(SetSendMsgFailedFlagReq) returns(SetSendMsgFailedFlagResp); rpc SetSendMsgFailedFlag(SetSendMsgFailedFlagReq) returns(SetSendMsgFailedFlagResp);