Update lot features
This commit is contained in:
@@ -108,7 +108,11 @@ public class CallController {
|
||||
Long callerId = SecurityHelper.getCurrentUserId();
|
||||
Long otherId = Long.parseLong(body.get("otherId"));
|
||||
String channelName = body.get("channelName");
|
||||
callNotificationService.notifyCallEnded(callerId, otherId, channelName);
|
||||
if (channelName == null || channelName.isBlank()) {
|
||||
callNotificationService.notifyCallEnded(callerId, otherId);
|
||||
} else {
|
||||
callNotificationService.notifyCallEnded(callerId, otherId, channelName);
|
||||
}
|
||||
return ResponseEntity.ok(ApiResponse.ok(null, "Call ended"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ public class CallNotifyRequest {
|
||||
/** Token Agora untuk receiver — dikirim lewat FCM payload */
|
||||
private String agoraToken;
|
||||
|
||||
private String agoraAppId;
|
||||
|
||||
/** UID Agora untuk receiver */
|
||||
private int receiverUid;
|
||||
}
|
||||
|
||||
+2
-1
@@ -40,6 +40,7 @@ public class CallNotificationService {
|
||||
payload.put("callerName", callerName);
|
||||
payload.put("channelName", req.getChannelName());
|
||||
payload.put("agoraToken", req.getAgoraToken() != null ? req.getAgoraToken() : "");
|
||||
payload.put("agoraAppId", req.getAgoraAppId() != null ? req.getAgoraAppId() : "");
|
||||
payload.put("receiverUid", String.valueOf(req.getReceiverUid()));
|
||||
|
||||
pendingCalls.put(receiver.getId(), payload);
|
||||
@@ -171,4 +172,4 @@ public class CallNotificationService {
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user