sendInviteEmails method
Implementation
Future<bool> sendInviteEmails(List<String> emails) async {
if (emails.isEmpty) return false;
Map<String, dynamic> body = {
"meeting_uid": meetingDetails.meetingUid,
"participantsEmail": emails,
};
bool isSuccess = false;
await networkRequestHandler(
apiCall: () => apiClient.inviteParticipants(selfIdentity, body),
onSuccess: (_) {
isSuccess = true;
sendMessageToUI("Invite sent");
sendAction(ActionModel(action: MeetingActions.refreshInvitedParticipants));
for (final delayMs in [500, 1500, 3000]) {
Timer(Duration(milliseconds: delayMs),
() => fetchInvitedParticipants(silent: true));
}
},
onError: (message) => sendMessageToUI(message),
);
return isSuccess;
}