Przeglądaj źródła

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>
Daniel Calviño Sánchez 2 lat temu
rodzic
commit
7b1bfb2c17

+ 1 - 6
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -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;