-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface with securitybot advice #12
Comments
Hey Julien, The tricky parts is how the BotFramework works. Microsoft pushes a message to the MsBot object (Extended Flask Object) every time a user messages within the chat. You can store this message by using state. The examples below use JsonState but I would recommend MongodbState. To get the user id's and also the channel / conversation ids you will probably have to use the state as well. To send messages you will want to use SendToConversation and CreateConversation if it is the first time messaging the user. This should be the same on all of the platforms. These are my rough notes on how I would do each. chat.py
config.json
Notes on MsBot objectThe MsBot object extends Flask. It creates a endpoint that the Microsoft posts to. This should really be run using gunicorn and not just MsBot.run(). You may want to create 2 applications. One using the MsBot object which you can run using gunicorn and it would write out the message logs to the state file. This would then allow you to extend the chat object and just read the state file. |
Hello @Grungnie |
Hello,
I'm looking to use microsoftbotframework with dropbox securitybot (https://github.com/dropbox/securitybot)
Chat wrapper seems very simple
https://github.com/dropbox/securitybot/blob/master/securitybot/chat/chat.py
mapping to microsoftbot
advices? mostly how to get_messages?
is there a recommendation between Conversation or Activity, especially depending on Target platform? (Skype, Teams...)
Thanks
The text was updated successfully, but these errors were encountered: