You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1021 B
29 lines
1021 B
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
|
|
}
|