finos / spring-bot

Spring Boot + Java Integration for Symphony/Teams Chat Platform Bots and Apps
https://springbot.finos.org
Apache License 2.0
60 stars 35 forks source link

Error message through in 9.x if you send IM message #363

Closed vaibhav-db closed 2 years ago

vaibhav-db commented 2 years ago

Error message through in 9.x if user sent IM message

Steps to Reproduce:

  1. Send IM message to Bot like /help
    1. You will received the help menu but in background error message through

Error Message:

An unknown error occurred while trying to connect to https://db-test-2.symphony.com:443/pod. Please check below for more information: {"code":400,"message":"Either the stream you're trying to access does not exist, you're not allowed to view its details, or this stream is not a room."}

code

In PresentationMLHandler.onApplicationEvent it load the Room info, there BDK log the error and return null. We should check the StreamType == ROOM then only load the RoomInfo

Same for ElementsHandler.accept, when user response in chat IM.

pankaj-a-khandelwal-db commented 2 years ago

For completeness - Though we see this error in logs, however there are no sideeffects of it. Code still works fine. So, this can be considered more like a warning message (though could cause confusion, hence better to fix).