Update lot features

This commit is contained in:
2026-05-28 16:29:23 +07:00
parent 6272ece15d
commit 1110e5a42d
81 changed files with 4306 additions and 29813 deletions
@@ -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;
}
@@ -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);
}
}
}