rejectCall function
Sends the reject
call signal via HTTP. It is useful in case when the used
doesn't have an active chat connection (for example from a Notification)
callSessionId
- the id of the P2PSession session
callMembers
- the ids of all call members including the caller and excluding
the current user
platform
- the platform name the app ran on
userInfo
- additional info about performed action
Implementation
Future<void> rejectCall(
String callSessionId,
Set<int> callMembers, {
String platform = 'flutter',
Map<String, String>? userInfo,
}) {
List<Future<void>> requests = [];
for (var memberId in callMembers) {
requests.add(RejectCallQuery(
callSessionId,
memberId,
platform,
userInfo ?? {},
).perform());
}
return Future.wait(requests);
}