Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

[Sdk] fix BotTestBase #2598

Merged
merged 1 commit into from
Oct 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ protected string[] ParseReplies(string templateId, StringDictionary tokens = nul
{
var replies = ResponseManager.GetResponseTemplate(templateId).Replies;
var responses = new string[replies.Length];
if (tokens == null)
{
return responses;
}

for (var i = 0; i < replies.Length; i++)
{
responses[i] = this.ResponseManager.Format(replies[i].Text, tokens);
responses[i] = tokens == null ? replies[i].Text : this.ResponseManager.Format(replies[i].Text, tokens);
}

return responses;
Expand All @@ -52,14 +48,10 @@ protected string[] ParseRepliesSpeak(string templateId, StringDictionary tokens
{
var replies = ResponseManager.GetResponseTemplate(templateId).Replies;
var responses = new string[replies.Length];
if (tokens == null)
{
return responses;
}

for (var i = 0; i < replies.Length; i++)
{
responses[i] = this.ResponseManager.Format(replies[i].Speak, tokens);
responses[i] = tokens == null ? replies[i].Speak : this.ResponseManager.Format(replies[i].Speak, tokens);
}

return responses;
Expand Down