From ed62a9464293d0b2a16b498571a823a9e8202db2 Mon Sep 17 00:00:00 2001 From: Chris Tremblay Date: Thu, 4 Jan 2024 10:34:26 -0500 Subject: [PATCH] Update PetStoreAssistantBot.java --- .../com/chtrembl/petstoreassistant/PetStoreAssistantBot.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/PetStoreAssistantBot.java b/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/PetStoreAssistantBot.java index 323d4f4d..47543e71 100644 --- a/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/PetStoreAssistantBot.java +++ b/petstore/petstoreassistant/src/main/java/com/chtrembl/petstoreassistant/PetStoreAssistantBot.java @@ -77,7 +77,12 @@ public CompletableFuture onTurn(TurnContext turnContext) { protected CompletableFuture onMessageActivity(TurnContext turnContext) { String text = turnContext.getActivity().getText().toLowerCase().trim(); + //XKQtkRt4hDBdwzwP2bwhs-us|0000014 String id = turnContext.getActivity().getId().trim(); + if(id.contains("-")) + { + id = id.substring(0, id.indexOf("-")); + } LOGGER.info("onMessageActivity: text {} id {} ", text, id);