-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Proactive Messages without Prior Context #6650
Comments
Pulling the proactive message from this sample like so
Yields the claim identity error above. Adding some logging to the library itself, to this function in node_modules/botframework-connector/lib/auth/parameterizedBotFrameworkAuthentication.js
Nets this result. Clearly I am authing somehow incorrect but some of the data in there does look familiar.
Printing the claim when doing a user initiated conversation nets this object.
|
Have you posted this to the Teams Samples repo? This is more of a Teams question since this is unique to the Teams channel. |
Good idea @tracyboehrer. I never got this to work. To get proactive messaging working I ended up installing the app to a specific team, saving that team reference (A webhook is fired off to your bot and I saved the raw data to a json object). Once you have that object you can use the graph api to create a new channel in the team and then update the channel id on the initial reference and send a message to that new channel. I kind of hate it, it seems hacky, but it is working. |
I know this is not for asking for help, but I went the Stack Overflow route and I did not get any (correct) answers, or I am just not smart enough to put the pieces together.
I even went as far as to try to do this with the Graph API but when I got everything together to sent the message it gave me an error that it is explicitly not allowed to post messages as the bot through that API and to use the Bot Framework SDK
Scenario
I need a service to listen for a webhook from a 3rd party and then use data from that webhook to message a information to a Team Channel in Microsoft Teams.
The message needs to come from the Bot and not a User.
The message cannot be tied to any previous conversation because ideally this should create a new channel and invite users that are needed to address whatever the event from the webhook was.
This service will eventually do normal user initiated ChatOps stuff, but this first iteration seems to be very non standard.
Sample project can be found here https://github.com/Chocrates/chatops-sample
Webhook Listener
Broken Proactive Message Code
The latest error I have been getting is that TypeError: claimsIdentity.getClaimValue is not a function, but basically every change I try gives me new and different errors, so something is fundamentally wrong with my understanding of the SDK.
Does anyone have any working sample code I can look at? So far everything I have found about sending proactive messages needs a conversation reference which I will not have in this scenario.
The text was updated successfully, but these errors were encountered: