mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
a456936853
commit
d12d571c2b
@ -85,9 +85,9 @@ credential:
|
|||||||
rpcport:
|
rpcport:
|
||||||
openImUserPort: [ 10100 ]
|
openImUserPort: [ 10100 ]
|
||||||
openImFriendPort: [ 10200 ]
|
openImFriendPort: [ 10200 ]
|
||||||
openImOfflineMessagePort: [ 10300]
|
openImOfflineMessagePort: [ 10300 ]
|
||||||
openImOnlineRelayPort: [ 10400 ]
|
openImOnlineRelayPort: [ 10400 ]
|
||||||
openImGroupPort: [ 10500 ]
|
openImGroupPort: [ 10500 ]
|
||||||
openImAuthPort: [ 10600 ]
|
openImAuthPort: [ 10600 ]
|
||||||
openImPushPort: [ 10700 ]
|
openImPushPort: [ 10700 ]
|
||||||
c2c:
|
c2c:
|
||||||
@ -144,8 +144,8 @@ push:
|
|||||||
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"
|
||||||
manager:
|
manager:
|
||||||
appManagerUid: ["openIM123456","openIM654321"]
|
appManagerUid: [ "openIM123456","openIM654321" ]
|
||||||
secrets: ["openIM1","openIM2"]
|
secrets: [ "openIM1","openIM2" ]
|
||||||
|
|
||||||
secret: tuoyun
|
secret: tuoyun
|
||||||
|
|
||||||
@ -176,6 +176,7 @@ iOSPush:
|
|||||||
badgeCount: true
|
badgeCount: true
|
||||||
|
|
||||||
notification:
|
notification:
|
||||||
|
|
||||||
groupCreated:
|
groupCreated:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 1
|
reliabilityLevel: 1
|
||||||
@ -188,8 +189,7 @@ notification:
|
|||||||
defaultTips:
|
defaultTips:
|
||||||
tips: "create the group" # xx create the group
|
tips: "create the group" # xx create the group
|
||||||
|
|
||||||
|
groupInfoSet:
|
||||||
groupInfoChanged:
|
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 1
|
reliabilityLevel: 1
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -201,9 +201,105 @@ notification:
|
|||||||
defaultTips:
|
defaultTips:
|
||||||
tips: "group info changed by" # group info changed by xx
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
joinGroupApplication:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
memberQuit:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
FriendApplicationAdded:
|
groupApplicationAccepted:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
groupApplicationRejected:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
groupOwnerTransferred:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
memberKicked:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
memberInvited:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
memberEnter:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 1
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: false
|
||||||
|
title: "group info changed title"
|
||||||
|
desc: "group info changed desc"
|
||||||
|
ext: "group info changed ext"
|
||||||
|
defaultTips:
|
||||||
|
tips: "group info changed by" # group info changed by xx
|
||||||
|
|
||||||
|
#############################friend#################################
|
||||||
|
|
||||||
|
friendApplicationAdded:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -215,7 +311,7 @@ notification:
|
|||||||
defaultTips:
|
defaultTips:
|
||||||
tips: "I applies to add you as a friend" #
|
tips: "I applies to add you as a friend" #
|
||||||
|
|
||||||
FriendApplicationApproved:
|
friendApplicationApproved:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -228,7 +324,7 @@ notification:
|
|||||||
tips: "I applies to add your friend application" #
|
tips: "I applies to add your friend application" #
|
||||||
|
|
||||||
|
|
||||||
FriendApplicationRejected:
|
friendApplicationRejected:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -244,7 +340,7 @@ notification:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FriendAdded:
|
friendAdded:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 3
|
reliabilityLevel: 3
|
||||||
unreadCount: true
|
unreadCount: true
|
||||||
@ -258,7 +354,7 @@ notification:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FriendDeleted:
|
friendDeleted:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -271,7 +367,7 @@ notification:
|
|||||||
tips: "Deleted a friend" #
|
tips: "Deleted a friend" #
|
||||||
|
|
||||||
|
|
||||||
FriendInfoChanged:
|
friendInfoChanged:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -285,7 +381,7 @@ notification:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BlackAdded:
|
blackAdded:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -298,7 +394,7 @@ notification:
|
|||||||
tips: "Blocked a user" #
|
tips: "Blocked a user" #
|
||||||
|
|
||||||
|
|
||||||
BlackDeleted:
|
blackDeleted:
|
||||||
conversation:
|
conversation:
|
||||||
reliabilityLevel: 2
|
reliabilityLevel: 2
|
||||||
unreadCount: false
|
unreadCount: false
|
||||||
@ -310,7 +406,20 @@ notification:
|
|||||||
defaultTips:
|
defaultTips:
|
||||||
tips: "Remove a blocked user"
|
tips: "Remove a blocked user"
|
||||||
|
|
||||||
" # xx applied to add you as a friend
|
#####################user#########################
|
||||||
|
userInfoUpdated:
|
||||||
|
conversation:
|
||||||
|
reliabilityLevel: 2
|
||||||
|
unreadCount: false
|
||||||
|
offlinePush:
|
||||||
|
switch: true
|
||||||
|
title: "Remove a blocked user"
|
||||||
|
desc: "Remove a blocked user"
|
||||||
|
ext: "Remove a blocked user"
|
||||||
|
defaultTips:
|
||||||
|
tips: "Remove a blocked user"
|
||||||
|
|
||||||
|
" # xx applied to add you as a friend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -327,9 +436,9 @@ demo:
|
|||||||
superCode: 666666
|
superCode: 666666
|
||||||
mail:
|
mail:
|
||||||
title: "openIM"
|
title: "openIM"
|
||||||
senderMail: "1765567899@qq.com"
|
senderMail: "1765567899@qq.com"
|
||||||
senderAuthorizationCode: "1gxyausfoevlzbfag"
|
senderAuthorizationCode: "1gxyausfoevlzbfag"
|
||||||
smtpAddr: "smtp.qq.com"
|
smtpAddr: "smtp.qq.com"
|
||||||
smtpPort: 25
|
smtpPort: 25
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"Open_IM/pkg/common/token_verify"
|
"Open_IM/pkg/common/token_verify"
|
||||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||||
"Open_IM/pkg/proto/chat"
|
"Open_IM/pkg/proto/chat"
|
||||||
"Open_IM/pkg/proto/sdk_ws"
|
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||||
"context"
|
"context"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
pbChat "Open_IM/pkg/proto/chat"
|
pbChat "Open_IM/pkg/proto/chat"
|
||||||
"Open_IM/pkg/proto/sdk_ws"
|
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
commonDB "Open_IM/pkg/common/db"
|
commonDB "Open_IM/pkg/common/db"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/proto/sdk_ws"
|
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ type config struct {
|
|||||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||||
}
|
}
|
||||||
FriendRemarkSet struct {
|
FriendInfoChanged struct {
|
||||||
Conversation PConversation `yaml:"conversation"`
|
Conversation PConversation `yaml:"conversation"`
|
||||||
OfflinePush POfflinePush `yaml:"offlinePush"`
|
OfflinePush POfflinePush `yaml:"offlinePush"`
|
||||||
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
DefaultTips PDefaultTips `yaml:"defaultTips"`
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
pbMsg "Open_IM/pkg/proto/chat"
|
pbMsg "Open_IM/pkg/proto/chat"
|
||||||
"Open_IM/pkg/proto/sdk_ws"
|
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
@ -3,7 +3,6 @@ package utils
|
|||||||
import (
|
import (
|
||||||
db "Open_IM/pkg/common/db"
|
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/token_verify"
|
"Open_IM/pkg/common/token_verify"
|
||||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user