Skip to content

Commit

Permalink
Update PetStoreAssistantBot.java
Browse files Browse the repository at this point in the history
  • Loading branch information
chtrembl committed Jan 4, 2024
1 parent 95b2e84 commit 6ef0746
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,21 @@ protected CompletableFuture<Void> onMessageActivity(TurnContext turnContext) {
LOGGER.info("onMessageActivity: text {} id {} ", text, id);


AzurePetStoreSessionInfo azurePetStoreSessionInfo = this.sessionCache.get(id);
AzurePetStoreSessionInfo azurePetStoreSessionInfo = this.sessionCache.get(id);

LOGGER.info("azurePetStoreSessionInfo", azurePetStoreSessionInfo);
if(azurePetStoreSessionInfo != null)
{
LOGGER.info("azurePetStoreSessionInfo.getNewText()", azurePetStoreSessionInfo.getSessionID());
}

Set<String> keys = this.sessionCache.keySet();
String keystring = "";
for(String key: keys){
keystring += key+" ";
}
LOGGER.info("sessionCache keys: "+keystring);


// strip out session id and csrf token if one was passed from soul machines
// sendTextMessage() function
Expand Down Expand Up @@ -110,7 +124,7 @@ protected CompletableFuture<Void> onMessageActivity(TurnContext turnContext) {
if (text.contains("debug"))
{
return turnContext.sendActivity(
MessageFactory.text("id:"+id+" sessionid"+azurePetStoreSessionInfo)).thenApply(sendResult -> null);
MessageFactory.text("id:"+id+" keystring: "+keystring)).thenApply(sendResult -> null);
//return turnContext.sendActivity(
// MessageFactory.text("sender: "+turnContext.getActivity().getFrom())).thenApply(sendResult -> null);
//Set<String> keys = turnContext.getActivity().getRecipient().getProperties().keySet();
Expand Down

0 comments on commit 6ef0746

Please sign in to comment.