This commit is contained in:
Mario Danic 2018-10-17 17:35:25 +02:00
parent 18f7b7fc72
commit 5dd36a2fcc
5 changed files with 15 additions and 16 deletions

View file

@ -1642,7 +1642,6 @@ public class CallController extends BaseController {
ncMessageWrapper.setSessionId(callSession);
NCSignalingMessage ncSignalingMessage = new NCSignalingMessage();
ncSignalingMessage.setTo(sessionDescriptionSend.getPeerId());
ncSignalingMessage.setFrom(callSession);
ncSignalingMessage.setRoomType("video");
ncSignalingMessage.setType(sessionDescriptionSend.getType());
NCMessagePayload ncMessagePayload = new NCMessagePayload();

View file

@ -30,7 +30,7 @@ import lombok.Data;
@Data
@JsonObject
@Parcel
public class RecipientWebSocketMessage {
public class ActorWebSocketMessage {
@JsonField(name = "type")
String type;

View file

@ -22,7 +22,6 @@ package com.nextcloud.talk.models.json.websocket;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import com.nextcloud.talk.models.json.signaling.NCMessageWrapper;
import com.nextcloud.talk.models.json.signaling.NCSignalingMessage;
import org.parceler.Parcel;
@ -34,7 +33,10 @@ import lombok.Data;
@Parcel
public class CallWebSocketMessage {
@JsonField(name = "recipient")
RecipientWebSocketMessage recipientWebSocketMessage;
ActorWebSocketMessage actorWebSocketMessage;
@JsonField(name = "sender")
ActorWebSocketMessage senderWebSocketMessage;
@JsonField(name = "data")
NCSignalingMessage ncSignalingMessage;

View file

@ -32,7 +32,7 @@ import lombok.Data;
@Parcel
public class RequestOfferSignalingMessage {
@JsonField(name = "recipient")
RecipientWebSocketMessage recipientWebSocketMessage;
ActorWebSocketMessage actorWebSocketMessage;
@JsonField(name = "data")
SignalingDataWebSocketMessageForOffer signalingDataWebSocketMessageForOffer;

View file

@ -23,13 +23,13 @@ package com.nextcloud.talk.webrtc;
import com.nextcloud.talk.application.NextcloudTalkApplication;
import com.nextcloud.talk.models.database.UserEntity;
import com.nextcloud.talk.models.json.signaling.NCMessageWrapper;
import com.nextcloud.talk.models.json.websocket.ActorWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.AuthParametersWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.AuthWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.CallOverallWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.CallWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.HelloOverallWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.HelloWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.RecipientWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.RequestOfferOverallWebSocketMessage;
import com.nextcloud.talk.models.json.websocket.RequestOfferSignalingMessage;
import com.nextcloud.talk.models.json.websocket.RoomOverallWebSocketMessage;
@ -44,8 +44,6 @@ import javax.inject.Inject;
import autodagger.AutoInjector;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.WebSocket;
@AutoInjector(NextcloudTalkApplication.class)
public class WebSocketConnectionHelper {
@ -125,10 +123,10 @@ public class WebSocketConnectionHelper {
RequestOfferSignalingMessage requestOfferSignalingMessage = new RequestOfferSignalingMessage();
RecipientWebSocketMessage recipientWebSocketMessage = new RecipientWebSocketMessage();
recipientWebSocketMessage.setType("session");
recipientWebSocketMessage.setSessionId(sessionId);
requestOfferSignalingMessage.setRecipientWebSocketMessage(recipientWebSocketMessage);
ActorWebSocketMessage actorWebSocketMessage = new ActorWebSocketMessage();
actorWebSocketMessage.setType("session");
actorWebSocketMessage.setSessionId(sessionId);
requestOfferSignalingMessage.setActorWebSocketMessage(actorWebSocketMessage);
SignalingDataWebSocketMessageForOffer signalingDataWebSocketMessageForOffer = new SignalingDataWebSocketMessageForOffer();
signalingDataWebSocketMessageForOffer.setRoomType(roomType);
@ -145,10 +143,10 @@ public class WebSocketConnectionHelper {
CallWebSocketMessage callWebSocketMessage = new CallWebSocketMessage();
RecipientWebSocketMessage recipientWebSocketMessage = new RecipientWebSocketMessage();
recipientWebSocketMessage.setType("session");
recipientWebSocketMessage.setSessionId(ncMessageWrapper.getSignalingMessage().getTo());
callWebSocketMessage.setRecipientWebSocketMessage(recipientWebSocketMessage);
ActorWebSocketMessage actorWebSocketMessage = new ActorWebSocketMessage();
actorWebSocketMessage.setType("session");
actorWebSocketMessage.setSessionId(ncMessageWrapper.getSignalingMessage().getTo());
callWebSocketMessage.setActorWebSocketMessage(actorWebSocketMessage);
callWebSocketMessage.setNcSignalingMessage(ncMessageWrapper.getSignalingMessage());
callOverallWebSocketMessage.setCallWebSocketMessage(callWebSocketMessage);