mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 21:45:42 +03:00
Cleanups
This commit is contained in:
parent
18f7b7fc72
commit
5dd36a2fcc
5 changed files with 15 additions and 16 deletions
|
@ -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();
|
||||
|
|
|
@ -30,7 +30,7 @@ import lombok.Data;
|
|||
@Data
|
||||
@JsonObject
|
||||
@Parcel
|
||||
public class RecipientWebSocketMessage {
|
||||
public class ActorWebSocketMessage {
|
||||
@JsonField(name = "type")
|
||||
String type;
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -32,7 +32,7 @@ import lombok.Data;
|
|||
@Parcel
|
||||
public class RequestOfferSignalingMessage {
|
||||
@JsonField(name = "recipient")
|
||||
RecipientWebSocketMessage recipientWebSocketMessage;
|
||||
ActorWebSocketMessage actorWebSocketMessage;
|
||||
|
||||
@JsonField(name = "data")
|
||||
SignalingDataWebSocketMessageForOffer signalingDataWebSocketMessageForOffer;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue