mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Fix an issue with variable datatypes
Signed-off-by: Tilo Spannagel <development@tilosp.de>
This commit is contained in:
parent
92919928fa
commit
e48ea806b4
@ -1172,7 +1172,7 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ("usersInRoom".equals(messageType)) {
|
if ("usersInRoom".equals(messageType)) {
|
||||||
processUsersInRoom((List<HashMap<String, String>>) signaling.getMessageWrapper());
|
processUsersInRoom((List<HashMap<String, Object>>) signaling.getMessageWrapper());
|
||||||
} else if ("message".equals(messageType)) {
|
} else if ("message".equals(messageType)) {
|
||||||
NCSignalingMessage ncSignalingMessage = LoganSquare.parse(signaling.getMessageWrapper().toString(),
|
NCSignalingMessage ncSignalingMessage = LoganSquare.parse(signaling.getMessageWrapper().toString(),
|
||||||
NCSignalingMessage.class);
|
NCSignalingMessage.class);
|
||||||
@ -1350,17 +1350,24 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processUsersInRoom(List<HashMap<String, String>> users) {
|
private void processUsersInRoom(List<HashMap<String, Object>> users) {
|
||||||
List<String> newSessions = new ArrayList<>();
|
List<String> newSessions = new ArrayList<>();
|
||||||
Set<String> oldSesssions = new HashSet<>();
|
Set<String> oldSesssions = new HashSet<>();
|
||||||
|
|
||||||
for (HashMap<String, String> participant : users) {
|
for (HashMap<String, Object> participant : users) {
|
||||||
if (!participant.get("sessionId").equals(callSession)) {
|
if (!participant.get("sessionId").equals(callSession)) {
|
||||||
Object inCallObject = participant.get("inCall");
|
Object inCallObject = participant.get("inCall");
|
||||||
if ((boolean) inCallObject) {
|
boolean isNewSession;
|
||||||
newSessions.add(participant.get("sessionId"));
|
if (inCallObject instanceof Boolean) {
|
||||||
|
isNewSession = (boolean) inCallObject;
|
||||||
} else {
|
} else {
|
||||||
oldSesssions.add(participant.get("sessionId"));
|
isNewSession = ((long) inCallObject) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNewSession) {
|
||||||
|
newSessions.add(participant.get("sessionId").toString());
|
||||||
|
} else {
|
||||||
|
oldSesssions.add(participant.get("sessionId").toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user