mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
callback add ex field and sdk server shell update
This commit is contained in:
parent
f0ebc151db
commit
aa2d07ca8d
@ -102,6 +102,9 @@ cmsapi:
|
||||
sdk:
|
||||
openImSdkWsPort: [ 10003 ] #jssdk服务端口,默认即可,项目中使用jssdk才需开放此端口或做nginx转发
|
||||
dataDir: [ ../db/sdk/ ]
|
||||
openImWsAddress:
|
||||
openImApiAddress:
|
||||
|
||||
#对象存储服务,以下配置二选一,目前支持两种,腾讯云和minio,二者配置好其中一种即可(如果使用minio参考https://doc.rentsoft.cn/#/qa/minio搭建minio服务器)
|
||||
credential: #腾讯cos,发送图片、视频、文件时需要,请自行申请后替换,必须修改
|
||||
tencent:
|
||||
|
@ -29,6 +29,7 @@ func copyCallbackCommonReqStruct(msg *pbChat.SendMsgReq) cbApi.CommonCallbackReq
|
||||
SenderFaceURL: msg.MsgData.SenderFaceURL,
|
||||
Content: callback.GetContent(msg.MsgData),
|
||||
Seq: msg.MsgData.Seq,
|
||||
Ex: msg.MsgData.Ex,
|
||||
}
|
||||
return req
|
||||
}
|
||||
@ -137,11 +138,11 @@ func callbackAfterSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp
|
||||
}
|
||||
|
||||
func callbackWordFilter(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp {
|
||||
log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), msg)
|
||||
callbackResp := cbApi.CommonCallbackResp{OperationID: msg.OperationID}
|
||||
if !config.Config.Callback.CallbackWordFilter.Enable || msg.MsgData.ContentType != constant.Text {
|
||||
return callbackResp
|
||||
}
|
||||
log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), msg)
|
||||
commonCallbackReq := copyCallbackCommonReqStruct(msg)
|
||||
commonCallbackReq.CallbackCommand = constant.CallbackWordFilterCommand
|
||||
req := cbApi.CallbackWordFilterReq{
|
||||
|
@ -17,6 +17,7 @@ type CommonCallbackReq struct {
|
||||
Seq uint32 `json:"seq"`
|
||||
AtUserIDList []string `json:"atUserList"`
|
||||
SenderFaceURL string `json:"faceURL"`
|
||||
Ex string `json:"ex"`
|
||||
}
|
||||
|
||||
type CommonCallbackResp struct {
|
||||
|
@ -4,17 +4,13 @@ source ./style_info.cfg
|
||||
source ./path_info.cfg
|
||||
source ./function.sh
|
||||
ulimit -n 200000
|
||||
list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}')
|
||||
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
|
||||
|
||||
ws_address=$(cat $config_path | grep openImWsAddress | awk -F '[:]' '{print $NF}')
|
||||
api_address=$(cat $config_path | grep openImApiAddress | awk -F '[:]' '{print $NF}')
|
||||
list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}')
|
||||
logLevel=$(cat $config_path | grep remainLogLevel | awk -F '[:]' '{print $NF}')
|
||||
list_to_string $list1
|
||||
api_ports=($ports_array)
|
||||
list_to_string $list2
|
||||
ws_ports=($ports_array)
|
||||
list_to_string $list3
|
||||
sdk_ws_ports=($ports_array)
|
||||
list_to_string $list4
|
||||
|
||||
|
||||
|
||||
@ -28,7 +24,7 @@ fi
|
||||
#Waiting port recycling
|
||||
sleep 1
|
||||
cd ${sdk_server_binary_root}
|
||||
nohup ./${sdk_server_name} -openIM_api_port ${api_ports[0]} -openIM_ws_port ${ws_ports[0]} -sdk_ws_port ${sdk_ws_ports[0]} -openIM_log_level ${logLevel} >>../logs/openIM.log 2>&1 &
|
||||
nohup ./${sdk_server_name} -openIM_api_address ${api_address} -openIM_ws_address ${ws_address} -sdk_ws_port ${sdk_ws_ports[0]} -openIM_log_level ${logLevel} >>../logs/openIM.log 2>&1 &
|
||||
|
||||
#Check launched service process
|
||||
sleep 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user