mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-16 06:49:02 +08:00
multi terminal kick eachOther
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package requestBody
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"errors"
|
||||
)
|
||||
|
||||
@@ -53,9 +53,9 @@ func (p *Platform) Set(os string) error {
|
||||
}
|
||||
func (p *Platform) SetPlatform(platform string) error {
|
||||
switch platform {
|
||||
case utils.AndroidPlatformStr:
|
||||
case constant.AndroidPlatformStr:
|
||||
return p.SetAndroid()
|
||||
case utils.IOSPlatformStr:
|
||||
case constant.IOSPlatformStr:
|
||||
return p.SetIOS()
|
||||
default:
|
||||
return errors.New("platform err")
|
||||
|
||||
@@ -8,9 +8,9 @@ package logic
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/kafka"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -24,7 +24,7 @@ func Init(rpcPort int) {
|
||||
log.NewPrivateLog(config.Config.ModuleName.PushName)
|
||||
rpcServer.Init(rpcPort)
|
||||
pushCh.Init()
|
||||
pushTerminal = []int32{utils.IOSPlatformID, utils.AndroidPlatformID}
|
||||
pushTerminal = []int32{constant.IOSPlatformID, constant.AndroidPlatformID}
|
||||
}
|
||||
func init() {
|
||||
producer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschat.Addr, config.Config.Kafka.Ws2mschat.Topic)
|
||||
|
||||
@@ -97,7 +97,7 @@ func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) {
|
||||
default:
|
||||
content = constant.ContentType2PushContent[constant.Common]
|
||||
}
|
||||
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, utils.PlatformIDToName(t))
|
||||
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t))
|
||||
if err != nil {
|
||||
log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), t)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user