Implement proper in-call status for call links.

This commit is contained in:
Alex Hart
2023-08-10 10:41:09 -03:00
parent ee1291c816
commit 13853c708e
8 changed files with 76 additions and 40 deletions

View File

@@ -56,7 +56,7 @@ class CallLinkConnectedActionProcessor(
return superState.builder()
.changeCallInfoState()
.setPendingParticipants(pendingParticipants)
.setCallLinkPendingParticipants(pendingParticipants)
.build()
}
@@ -72,7 +72,7 @@ class CallLinkConnectedActionProcessor(
currentState
.builder()
.changeCallInfoState()
.setPendingParticipantApproved(recipient)
.setCallLinkPendingParticipantApproved(recipient)
.build()
} catch (e: CallException) {
Log.w(tag, "Failed to approve user.", e)
@@ -93,7 +93,7 @@ class CallLinkConnectedActionProcessor(
currentState
.builder()
.changeCallInfoState()
.setPendingParticipantRejected(recipient)
.setCallLinkPendingParticipantRejected(recipient)
.build()
} catch (e: CallException) {
Log.w(tag, "Failed to deny user.", e)

View File

@@ -345,17 +345,17 @@ public class WebRtcServiceStateBuilder {
return this;
}
public @NonNull CallInfoStateBuilder setPendingParticipants(@NonNull List<Recipient> pendingParticipants) {
public @NonNull CallInfoStateBuilder setCallLinkPendingParticipants(@NonNull List<Recipient> pendingParticipants) {
toBuild.setPendingParticipants(toBuild.getPendingParticipants().withRecipients(pendingParticipants));
return this;
}
public @NonNull CallInfoStateBuilder setPendingParticipantApproved(@NonNull Recipient participant) {
public @NonNull CallInfoStateBuilder setCallLinkPendingParticipantApproved(@NonNull Recipient participant) {
toBuild.setPendingParticipants(toBuild.getPendingParticipants().withApproval(participant));
return this;
}
public @NonNull CallInfoStateBuilder setPendingParticipantRejected(@NonNull Recipient participant) {
public @NonNull CallInfoStateBuilder setCallLinkPendingParticipantRejected(@NonNull Recipient participant) {
toBuild.setPendingParticipants(toBuild.getPendingParticipants().withDenial(participant));
return this;
}