mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 21:45:42 +03:00
Switch if to switch :)
This commit is contained in:
parent
5a3f199f14
commit
f6b1dca677
1 changed files with 14 additions and 10 deletions
|
@ -1190,16 +1190,20 @@ public class CallController extends BaseController {
|
|||
|
||||
@Subscribe(threadMode = ThreadMode.BACKGROUND)
|
||||
public void onMessageEvent(WebSocketCommunicationEvent webSocketCommunicationEvent) {
|
||||
if (webSocketCommunicationEvent.getType().equals("hello")) {
|
||||
callSession = webSocketClient.getSessionId();
|
||||
webSocketClient.joinRoomWithRoomToken(roomToken);
|
||||
alwaysGetPeerConnectionWrapperForSessionId(callSession, true);
|
||||
} else if ("participantsUpdate".equals(webSocketCommunicationEvent.getType())) {
|
||||
if (webSocketCommunicationEvent.getHashMap().get("roomId").equals(roomToken)) {
|
||||
processUsersInRoom((List<HashMap<String, Object>>) webSocketClient.getJobWithId(Integer.valueOf(webSocketCommunicationEvent.getHashMap().get("jobId"))));
|
||||
}
|
||||
} else if ("signalingMessage".equals(webSocketCommunicationEvent.getType())) {
|
||||
processMessage((NCSignalingMessage) webSocketClient.getJobWithId(Integer.valueOf(webSocketCommunicationEvent.getHashMap().get("jobId"))));
|
||||
switch (webSocketCommunicationEvent.getType()) {
|
||||
case "hello":
|
||||
callSession = webSocketClient.getSessionId();
|
||||
webSocketClient.joinRoomWithRoomToken(roomToken);
|
||||
alwaysGetPeerConnectionWrapperForSessionId(callSession, true);
|
||||
break;
|
||||
case "participantsUpdate":
|
||||
if (webSocketCommunicationEvent.getHashMap().get("roomId").equals(roomToken)) {
|
||||
processUsersInRoom((List<HashMap<String, Object>>) webSocketClient.getJobWithId(Integer.valueOf(webSocketCommunicationEvent.getHashMap().get("jobId"))));
|
||||
}
|
||||
break;
|
||||
case "signalingMessage":
|
||||
processMessage((NCSignalingMessage) webSocketClient.getJobWithId(Integer.valueOf(webSocketCommunicationEvent.getHashMap().get("jobId"))));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue