Created
April 27, 2018 14:10
-
-
Save angelobelchior/5b7160f7a71cd77f1ecc80c91350ab14 to your computer and use it in GitHub Desktop.
Welcome Message Bot Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task ShowWelcomeMessage(Activity activity) | |
{ | |
if (activity is IConversationUpdateActivity conversationUpdated) | |
{ | |
var connector = new ConnectorClient(new Uri(activity.ServiceUrl)); | |
foreach (var member in conversationUpdated.MembersAdded ?? Array.Empty<ChannelAccount>()) | |
{ | |
if (member.Id == conversationUpdated.Recipient.Id) | |
{ | |
var reply = Actions.WelcomeMessage(activity); | |
await connector.Conversations.ReplyToActivityAsync(reply); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment