updateChatAttachmentConsent method

void updateChatAttachmentConsent(
  1. bool value
)

Implementation

void updateChatAttachmentConsent(bool value) {
  Map<String, dynamic> body = {
    "meeting_id": meetingDetails.meetingUid,
    "permission_granted": value,
  };

  networkRequestHandler(
      apiCall: ()=> apiClient.updateChatAttachmentConsent(meetingDetails.authorizationToken, body),
      onSuccess: (data) {
        isChatAttachmentDownloadEnable = data?.chatAttachmentDownloadConsent == true;
        sendAction(ActionModel(action: MeetingActions.canDownloadChatAttachment, value: _isChatAttachmentDownloadEnable));
      },
      onError: (message) {
        sendMessageToUI(message);
        isChatAttachmentDownloadEnable = !isChatAttachmentDownloadEnable;
      }
  );
}