-
-
Save peted70/23abeab9c13a036368bf4744fd80c3dd to your computer and use it in GitHub Desktop.
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
if (message.Type == "Message") | |
{ | |
var userid = message?.From?.Id; | |
// Lookup the user id to see if we have a token already.. | |
var token = _creds.GetToken(userid); | |
string prompt = ""; | |
if (string.IsNullOrEmpty(token)) | |
{ | |
var loginUri = new Uri($"http://localhost:3978/api/auth/home?UserId={userid}"); | |
prompt = $"Please pay a visit to {loginUri.ToString()} to associate your user identity with your Microsoft Health identity."; | |
} | |
else | |
{ | |
// TODO: implement bot logic here | |
if (string.IsNullOrEmpty(prompt)) | |
prompt = "Please ask a question to the MS Health Bot"; | |
} | |
// return our reply to the user | |
return message.CreateReplyMessage(prompt); | |
} | |
else | |
{ | |
return HandleSystemMessage(message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment