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

Fix null reference exception #1523

Merged
merged 2 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
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 @@ -36,7 +36,7 @@ public static bool IsStartActivity(this Activity activity)
if (activity.Type == ActivityTypes.ConversationUpdate)
{
// When bot is added to the conversation (triggers start only once per conversation)
if (activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
if (activity.MembersAdded != null && activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static bool IsStartActivity(this Activity activity)
if (activity.Type == ActivityTypes.ConversationUpdate)
{
// When bot is added to the conversation (triggers start only once per conversation)
if (activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
if (activity.MembersAdded != null && activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static bool IsStartActivity(this Activity activity)
if (activity.Type == ActivityTypes.ConversationUpdate)
{
// When bot is added to the conversation (triggers start only once per conversation)
if (activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
if (activity.MembersAdded != null && activity.MembersAdded.Any(m => m.Id == activity.Recipient.Id))
{
return true;
}
Expand Down