Extract method to process "update" events

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2023-01-26 13:30:56 +01:00 committed by Marcel Hibbe
parent 7f8909567c
commit 6a799387c8
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -232,10 +232,18 @@ public abstract class SignalingMessageReceiver {
}
protected void processEvent(Map<String, Object> eventMap) {
if (!"update".equals(eventMap.get("type")) || !"participants".equals(eventMap.get("target"))) {
if (!"participants".equals(eventMap.get("target"))) {
return;
}
if ("update".equals(eventMap.get("type"))) {
processUpdateEvent(eventMap);
return;
}
}
private void processUpdateEvent(Map<String, Object> eventMap) {
Map<String, Object> updateMap;
try {
updateMap = (Map<String, Object>) eventMap.get("update");