public async Task <JsonResult> RequestCollaboration([FromHeader] int accountId, [FromBody] CollabRequestVM collabData)
        {
            var havePendingOrAcceptedRequest = await _collaborationService.DoTheyHavePendingOrAcceptedCollaborationRequest(accountId, collabData.UniqueId);

            if (!havePendingOrAcceptedRequest.HasValue)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while getting data."
                }));
            }
            if (havePendingOrAcceptedRequest.Value)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "A request for collaboration between you guys is pending."
                }));
            }

            var errorMessage = collabData.ValidateMessage();

            if (errorMessage.Length != 0)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Data = errorMessage
                }));
            }

            var requestedCollaborator = await _userService.GetUserByUniqueId(collabData.UniqueId);

            if (requestedCollaborator == null)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while getting data."
                }));
            }

            var requestedAccount = await _accountService.GetUserAccountById(requestedCollaborator.AccountId);

            if (requestedAccount == null)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while getting data."
                }));
            }

            var(error, requester) = await _userService.GetUserProfileByAccountId(accountId);

            if (error || requester == null)
            {
                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while getting data."
                }));
            }

            var collaboration = new Collaboration {
                UserId         = requester.Id,
                CollaboratorId = requestedCollaborator.Id,
                Message        = collabData.Message,
                InvitedOn      = DateTime.UtcNow
            };

            await _collaborationService.StartTransaction();

            var saveResult = await _collaborationService.InsertNewCollaboratorRequest(collaboration);

            if (!saveResult.HasValue || !saveResult.Value)
            {
                await _collaborationService.RevertTransaction();

                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while saving data."
                }));
            }

            var isNotified = await SendNotification(
                requester,
                requestedCollaborator.Id,
                new UserNotification {
                Message = $"{ TokenNotifierName } has just sent you a collaboration request. Please respond as soon as possible.",
                Title   = "Collaboration Request Sent"
            },
                _userService,
                requestedAccount.FcmToken
                );

            if (!isNotified)
            {
                await _collaborationService.RevertTransaction();

                return(new JsonResult(new JsonResponse {
                    Result = SharedEnums.RequestResults.Failed, Message = "An issue happened while sending notification."
                }));
            }

            await _collaborationService.CommitTransaction();

            return(new JsonResult(new JsonResponse {
                Result = SharedEnums.RequestResults.Success
            }));
        }