mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
remove rtc
This commit is contained in:
@@ -119,8 +119,6 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive
|
||||
{
|
||||
t := NewThird(discov)
|
||||
thirdGroup.Use(mw.GinParseToken(rdb))
|
||||
thirdGroup.POST("/get_rtc_invitation_info", t.GetSignalInvitationInfo)
|
||||
thirdGroup.POST("/get_rtc_invitation_start_app", t.GetSignalInvitationInfoStartApp)
|
||||
thirdGroup.POST("/fcm_update_token", t.FcmUpdateToken)
|
||||
thirdGroup.POST("/set_app_badge", t.SetAppBadge)
|
||||
|
||||
|
||||
@@ -54,14 +54,6 @@ func (o *Third) GetHash(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.GetHashInfo, o.client, c)
|
||||
}
|
||||
|
||||
func (o *Third) GetSignalInvitationInfo(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.GetSignalInvitationInfo, o.client, c)
|
||||
}
|
||||
|
||||
func (o *Third) GetSignalInvitationInfoStartApp(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.GetSignalInvitationInfoStartApp, o.client, c)
|
||||
}
|
||||
|
||||
func (o *Third) FcmUpdateToken(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.FcmUpdateToken, o.client, c)
|
||||
}
|
||||
|
||||
@@ -102,15 +102,6 @@ func (g GrpcHandler) SendMessage(context context.Context, data Req) ([]byte, err
|
||||
}
|
||||
|
||||
func (g GrpcHandler) SendSignalMessage(context context.Context, data Req) ([]byte, error) {
|
||||
signalReq := sdkws.SignalReq{}
|
||||
if err := proto.Unmarshal(data.Data, &signalReq); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := g.validate.Struct(&signalReq); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
//req := pbRtc.SignalMessageAssembleReq{SignalReq: &signalReq, OperationID: "111"}
|
||||
//todo rtc rpc call
|
||||
resp, err := g.msgRpcClient.SendMsg(context, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
type Pusher struct {
|
||||
@@ -97,15 +96,6 @@ func (p *Pusher) Push2User(ctx context.Context, userIDs []string, msg *sdkws.Msg
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if msg.ContentType == constant.SignalingNotification {
|
||||
isSend, err := p.database.HandleSignalInvite(ctx, msg, userID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !isSend {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if err := callbackOfflinePush(ctx, userIDs, msg, &[]string{}); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -268,16 +258,16 @@ func (p *Pusher) offlinePushMsg(ctx context.Context, conversationID string, msg
|
||||
|
||||
func (p *Pusher) GetOfflinePushOpts(msg *sdkws.MsgData) (opts *offlinepush.Opts, err error) {
|
||||
opts = &offlinepush.Opts{}
|
||||
if msg.ContentType > constant.SignalingNotificationBegin && msg.ContentType < constant.SignalingNotificationEnd {
|
||||
req := &sdkws.SignalReq{}
|
||||
if err := proto.Unmarshal(msg.Content, req); err != nil {
|
||||
return nil, utils.Wrap(err, "")
|
||||
}
|
||||
switch req.Payload.(type) {
|
||||
case *sdkws.SignalReq_Invite, *sdkws.SignalReq_InviteInGroup:
|
||||
opts.Signal = &offlinepush.Signal{ClientMsgID: msg.ClientMsgID}
|
||||
}
|
||||
}
|
||||
// if msg.ContentType > constant.SignalingNotificationBegin && msg.ContentType < constant.SignalingNotificationEnd {
|
||||
// req := &sdkws.SignalReq{}
|
||||
// if err := proto.Unmarshal(msg.Content, req); err != nil {
|
||||
// return nil, utils.Wrap(err, "")
|
||||
// }
|
||||
// switch req.Payload.(type) {
|
||||
// case *sdkws.SignalReq_Invite, *sdkws.SignalReq_InviteInGroup:
|
||||
// opts.Signal = &offlinepush.Signal{ClientMsgID: msg.ClientMsgID}
|
||||
// }
|
||||
// }
|
||||
if msg.OfflinePushInfo != nil {
|
||||
opts.IOSBadgeCount = msg.OfflinePushInfo.IOSBadgeCount
|
||||
opts.IOSPushSound = msg.OfflinePushInfo.IOSPushSound
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package third
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"
|
||||
)
|
||||
|
||||
func (t *thirdServer) GetSignalInvitationInfo(ctx context.Context, req *third.GetSignalInvitationInfoReq) (resp *third.GetSignalInvitationInfoResp, err error) {
|
||||
signalReq, err := t.thirdDatabase.GetSignalInvitationInfoByClientMsgID(ctx, req.ClientMsgID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp = &third.GetSignalInvitationInfoResp{}
|
||||
resp.InvitationInfo = signalReq.Invitation
|
||||
resp.OfflinePushInfo = signalReq.OfflinePushInfo
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (t *thirdServer) GetSignalInvitationInfoStartApp(ctx context.Context, req *third.GetSignalInvitationInfoStartAppReq) (resp *third.GetSignalInvitationInfoStartAppResp, err error) {
|
||||
signalReq, err := t.thirdDatabase.GetAvailableSignalInvitationInfo(ctx, req.UserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp = &third.GetSignalInvitationInfoStartAppResp{}
|
||||
resp.InvitationInfo = signalReq.Invitation
|
||||
resp.OfflinePushInfo = signalReq.OfflinePushInfo
|
||||
return resp, nil
|
||||
}
|
||||
Reference in New Issue
Block a user