Skip to content

Commit

Permalink
Added logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
julie authored and julie committed Mar 15, 2017
1 parent a64bef2 commit 9a32a9f
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public async Task<string> ProcessMessagesAsync(string slackUserId, string slackC
_logger.Info(DateTime.UtcNow.Date);
string replyText = string.Empty;
SlackUserDetailAc slackUserDetail = await _slackUserDetailRepository.GetByIdAsync(slackUserId);
_logger.Info("\nSlack User Detail\n " + slackUserDetail);
SlackChannelDetails slackChannelDetail = await _slackChannelRepository.GetByIdAsync(slackChannelId);
_logger.Info("\nSlack Channel Detail\n " + slackChannelDetail);
//the command is split to individual words
//commnads ex: "scrum time", "leave @userId"
string[] messageArray = message.Split(null);
Expand Down Expand Up @@ -512,7 +514,6 @@ private async Task<Scrum> GetScrumAsync(int projectId)
/// <returns>the next question statement</returns>
private async Task<string> AddScrumAnswerAsync(string slackUserName, string message, int? projectId, string slackUserId, bool isLinkCommand)
{
string reply = string.Empty;
if (projectId != null)
{
//today's scrum of the channel
Expand Down Expand Up @@ -549,23 +550,23 @@ private async Task<string> AddScrumAnswerAsync(string slackUserName, string mess
//update the details in temporary table
await UpdateTemporaryScrumDetailsAsync(slackUserId, scrum.Id, users, null);
//get the next question
reply = await GetQuestionAsync(scrum.Id, questions, users, scrum.ProjectId);
return await GetQuestionAsync(scrum.Id, questions, users, scrum.ProjectId);
}
//the user interacting is not the expected user
else
reply = status;
return status;
}
else
reply = ReplyStatusofScrumToClient(scrumStatus);
return ReplyStatusofScrumToClient(scrumStatus);
}
else
// if user doesn't exist then this message will be shown to user
reply = _stringConstant.YouAreNotInExistInOAuthServer;
return _stringConstant.YouAreNotInExistInOAuthServer;
}
}
else if (isLinkCommand && projectId == null)
return _stringConstant.ProjectChannelNotLinked;
return reply;
return string.Empty;
}


Expand Down

0 comments on commit 9a32a9f

Please sign in to comment.