public async Task AddMessage(int claimId, string authorUsername, string messageText) { claimRepository.AddMessage(claimId, authorUsername, messageText); var claim = claimRepository.GetClaim(claimId); await emailManager.SendNewMessageEmailTo(claim.ClaimingUsername, authorUsername).ConfigureAwait(false); }
public async Task AddEndorsement(int claimId, string endorsingUsername, string endorsementMessage) { Message message = claimRepository.AddMessage(claimId, endorsingUsername, endorsementMessage); endorsementRepository.AddEndorsement(claimId, endorsingUsername, message); claimRepository.SetClaimToEndorsed(claimId); var claim = claimRepository.GetClaim(claimId); await emailManager.SendNewMessageEmailTo(claim.ClaimingUsername, endorsingUsername).ConfigureAwait(false); }