mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-11 18:10:44 +00:00
Simplify getting the message type
The message type is set for all signaling messages. On the other hand, the payload type is only set for offers and answers (and, if the message was sent by the Android app, also for candidates). However, in all those cases the payload type just duplicates the message type, so the message type can be assigned directly rather than falling back to it if there is no payload type. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
55d923394c
commit
7b1bfb2c17
@ -1664,12 +1664,7 @@ public class CallActivity extends CallBaseActivity {
|
||||
|
||||
private void processMessage(NCSignalingMessage ncSignalingMessage) {
|
||||
if ("video".equals(ncSignalingMessage.getRoomType()) || "screen".equals(ncSignalingMessage.getRoomType())) {
|
||||
String type = null;
|
||||
if (ncSignalingMessage.getPayload() != null && ncSignalingMessage.getPayload().getType() != null) {
|
||||
type = ncSignalingMessage.getPayload().getType();
|
||||
} else if (ncSignalingMessage.getType() != null) {
|
||||
type = ncSignalingMessage.getType();
|
||||
}
|
||||
String type = ncSignalingMessage.getType();
|
||||
|
||||
PeerConnectionWrapper peerConnectionWrapper = null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user