officedev / botbuilder-microsoftteams Goto Github PK
View Code? Open in Web Editor NEWMicrosoft Bot Builder extension library for developing bots for Microsoft Teams
License: MIT License
Microsoft Bot Builder extension library for developing bots for Microsoft Teams
License: MIT License
I have been trying to get the answer since long. I had posted it here [*] so thought I will have have better luck if I post here.
Hi,
When i try to update a card with another card i get a message saying "Activity resulted into multiple skype activities"
Test code
Activity cardTest = new Activity();
cardTest.withType(ActivityTypes.MESSAGE).withRecipient(activity.from())
.withId(activity.id()).withFrom(activity.recipient())
.withAttachments(Arrays.asList(
new Attachment().withContentType("application/vnd.microsoft.card.thumbnail")
.withContent(new ThumbnailCard().withTitle("Thumbnail")
.withSubtitle("card").withText("Thumbnail card"))));
String actId = new BotConnectorImpl(activity.serviceUrl())
.sendToConversation(activity.conversation().id(), activity.id(), cardTest);
new Runnable() {
@Override
public void run() {
try {
Thread.sleep(2000);
System.out.println("Sending world");
new BotConnectorImpl(activity.serviceUrl()).updateConversation(
activity.conversation().id(), actId,
new Activity().withType(ActivityTypes.MESSAGE).withText("World")
.withId(actId)
.withAttachments(Arrays.asList(new Attachment()
.withContentType(
"application/vnd.microsoft.card.thumbnail")
.withContent(new ThumbnailCard()
.withTitle("Thumbnail new").withSubtitle("card")
.withText("Thumbnail card")))));
} catch (Exception e) {
e.printStackTrace();
}
}
`}.run();`
For the first call i get back the following response
Response{protocol=http/1.1, code=201, message=Created, url=https://smba.trafficmanager.net/inlocal-client-ss.msg/v3/conversations/a:1eqU_84Pldp0o64r8ZSkPs8tFylA2Tl6v-XdbDnRyHkZHbWtdirivh0NTYQ-Y9Ro9cUQN6Txt9HFt49Qgw56ewE7UfvQuttra2tpI0GIHDUXGMVSWiSnuVesjc4GdJuO_/activities/1529042383029}
{"id" = "1:1LOoYnwMp4chbJTW6ltBxMm1EwRp3j13gWgbS-qeY-Zs"}
And in response i get the following for which i am getting the error message
[apache-tomcat-9.0.8]: Response{protocol=http/1.1, code=400, message=Bad Request, url=https://smba.trafficmanager.net/inlocal-client-ss.msg/v3/conversations/a:1eqU_84Pldp0o64r8ZSkPs8tFylA2Tl6v-XdbDnRyHkZHbWtdirivh0NTYQ-Y9Ro9cUQN6Txt9HFt49Qgw56ewE7UfvQuttra2tpI0GIHDUXGMVSWiSnuVesjc4GdJuO_/activities/1:1LOoYnwMp4chbJTW6ltBxMm1EwRp3j13gWgbS-qeY-Zs}
Kindly let me know if anyone has a solution for this error.
Thanks
Hi,
Normally when we send a text message to MS teams we get back the id of the message just send which can be used to update the message.
Eg.
If we send the following to teams via botframework
new Activity().withType(ActivityTypes.MESSAGE).withText("Hello").withRecipient(activity.from())
.withFrom(activity.recipient())
via a POST call to
@post("v3/conversations/{conversationId}/activities/{activityId}")
we get back a response with the activity id like
{"id":"12345"}
but in case we send an attachment say a thumbnail card along with the above message then we do not get back an activity_id.
Does anyone know why this happens or if its a bug?
I have V3 BOT with Microsoft teams channel. I see following sporadic issue where it seems like teams is failing send response back to bot via serviceURL
Error: POST to 'https://smba.trafficmanager.net/amer-client-ss.msg/v3/conversations/a%3A1qNZgTUu4ASGZkGKPYDtZque7ucUYmAuWHi7pVx2qfw7gtuHtEUybWEJnQDeZl31zAcglGMyoxKUik-VOpLKqGXop4UFTiQ70NZzkj49LHhNSeVlYFnJTCAjVVFtoViDt/activities/1529002753254' failed: [400] Bad Request
at Request._callback (D:\home\site\wwwroot\node_modules\botbuilder\lib\bots\ChatConnector.js:559:46)
at Request.self.callback (D:\home\site\wwwroot\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (D:\home\site\wwwroot\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (D:\home\site\wwwroot\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1055:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
``
Before 0.1.7 added onSigninStateVerification(), bots had to handle signin/verifyState in their onInvoke handler. But with the upgrade to 0.1.6->0.1.7, existing code fails at runtime because signinStateVerificationHandler is missing.
TypeError: Cannot read property 'bind' of undefined
at TeamsChatConnector.dispatchEventOrQuery (c:\Projects\my-app\node_modules\botbuilder-teams\lib\TeamsChatConnector.js:212:81)
at TeamsChatConnector.onDispatchEvents (c:\Projects\my-app\node_modules\botbuilder-teams\lib\TeamsChatConnector.js:183:18)
at TeamsChatConnector.ChatConnector.dispatch (c:\Projects\my-app\node_modules\botbuilder\lib\bots\ChatConnector.js:466:18)
at c:\Projects\my-app\node_modules\botbuilder\lib\bots\ChatConnector.js:149:27
There's no warning that this PATCH version increment would break existing code, and there are no release notes.
I think we should pass the event on to the onInvoke() handler if more specific handlers are missing, so that existing code continues to work, and developers can switch to the more specific handlers at their leisure.
Hello!
Was wondering if we could get an ETA for v0.1.7
. Some of the fixes are important for us and the next
tag is not what master has.
Thanks!
Hi,
Is it possible to add say adaptive / hero cards to as a list item in list card? Is yes, how else is this feature in the pipeline?
Thanks
My customer would like to have RBAC capabilities for bots in MS Teams.
Administrators should be able allow custom bots for only target groups of people (AAD security groups).
Administrators should be able to have an audit log about what's going on between user and bot.
DLP features would be valuable feature as well. (for example, block sending files via bot).
We are experiencing issues when trying to get the members list of a 1vs1 conversation when the bot is installed only for private conversations. We are getting 404 thread not found. The thing is, if the bot is installed on a team, the same call is working . Is this the expected behavior ? If that is the case, how can we get the user information ?
Thanks!
I was unable to get Strip bot mentions from the message text to make work
TypeError: teams.StripBotAtMentions is not a constructor
at Object.<anonymous> (C:\bot\app.js:71:26)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3
I am not able to decide if I can user builder.ChatConnector() instead teams.TeamsChatConnector() for my nodejs bot service. Can we use ChatConnector for a bot which can be used in MS teams or we can have TeamsChatConnector() for MS teams 1:1 bot & can be used for other channels like Cortana,skype etc. My BOT service currently has ChatConnector() and Cortana channel. We added MS teams channel & thinking if we can just user same bot for 1:1 without having to change ChatConnector & user npm "botbuilder-teams".
There is a specific type of card type - list card that is supported only by Bots in Teams (no support in bot framework). Do you have plans to add support for this card type?
Let me know if you accept PR :)
I've integrated Actionable Message to Outlook and I want to re-use the message generator on Teams.
Is it possible that I re-use the Message Card JSON ( example here https://messagecardplayground.azurewebsites.net/ ) to do something like:
new teams.TeamsMessage(session).summary("Use O365 actionable card").attachments([Message Card JSON]);
I tried and I have this error :
POST to 'https://smba.trafficmanager.net/amer-client-ss.msg/v3/conversations/a:12AlKhSkgnTVfgDzW3Hc4dij0n91QoigLmVoaQhR0yP45ixenSC6l_qyC0OaU89hEFjn8PQh0BrmmyI0YV40KidUNfrDGJx38ladohfWAGsqSEtEhk8VryOXJ5Ri_arXL/activities/1525987601637' failed: [400] Bad Request
The typing for the Teams event classes (TeamEventBase, etc.) have no properties declared. They should have tenant, team and channel properties, as appropriate.
Node botbuilder-teams
pulls in an older version of ms-rest
which eventually pulls in a version of hoek
with a vulnerability.
nsp check
fails with the following output:
┌────────────┬────────────────────────────────────────────────────────────────────┐
│ │ Prototype pollution attack │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name │ hoek │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS │ 4 (Medium) │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed │ 2.16.3 │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <= 4.2.0 || >= 5.0.0 < 5.0.3 │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched │ > 4.2.0 < 5.0.0 || >= 5.0.3 │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path │ [email protected] > [email protected] > [email protected] > │
│ │ [email protected] > [email protected] > [email protected] │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info │ https://nodesecurity.io/advisories/566 │
└────────────┴────────────────────────────────────────────────────────────────────┘
I have a bot running as Cortana skill which works as meeting room finder. With Cortana channel and using sing-in at skill invocation which popup the sign-in window & authenticates user against Azure ADv1. Once use signed in I an access user information from token as follows
let authorizationToken = session.message.entities.find((e) => {
return e.type === 'AuthorizationToken';
});
I am trying to find how can I authenticate user for MS teams ? As per this https://docs.microsoft.com/en-us/microsoftteams/add-bots I'm just user botID to add a bot to teams. and 1:1 chat is initiated. I believe our MS teams has o365 talent as a backbone for corporate users.
Is there any strategy/library I can user to pull a user info in bot code and verify before chat initiated.
OR somehow user AADv1 for user authentication.
From what I know, if we want to send 1:1 message to all members of an organization, we need to do so:
connector.fetchMembers(serviceUrl, conversationId, function (err, result) {}
Is that the only way? Can we just register a personal bot for all members by Team Admin?
I have an API controller that calls a class which messages the user for the notification I'm doing for my app. Is there any possible way to access the custom state if I'm not using Dialogs?
nodemon
is defined as a dependency. It should probably be a dev dependency.
https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/blob/master/Node/package.json#L16
Hi,
The example here constructs dialogs using the session.message.address.serviceUrl
parameter. In this example it makes sense to assume that this value will be in the context of a message, because it is in response to a user message. However, if I just want the bot to send a message or create a new conversation or channel on MS teams without the user sending a message first, how can I get the session context (address.serviceUrl
) from the connector
/ bot
objects directly?
Request: add the special values good
, warning
, and danger
as theme colors. Slack has these and it's a lot easier than looking up the hex values.
I'm not set up to build or test this, but this works in my own version. If you'd rather, I could just submit a PR but it's not very clear how to set up the build environment and run the tests. @robin-liao I'll contact you offline.
Suggested source:
public themeColor(color: string): this {
if (color) {
color = color.toLowerCase();
switch (color) {
case "good":
(<teams.IO365ConnectorCard>this.data.content).themeColor = "#2ea34e"; // Green
break;
case "warning":
(<teams.IO365ConnectorCard>this.data.content).themeColor = "#de9d30"; // Yellow
break;
case "danger":
(<teams.IO365ConnectorCard>this.data.content).themeColor = "#d50000"; // Red
break;
default:
(<teams.IO365ConnectorCard>this.data.content).themeColor = color;
}
(<teams.IO365ConnectorCard>this.data.content).themeColor = color;
} else {
delete (<teams.IO365ConnectorCard>this.data.content).themeColor;
}
return this;
}
Current source:
public themeColor(color: string): this {
if (color) {
(<teams.IO365ConnectorCard>this.data.content).themeColor = color;
} else {
delete (<teams.IO365ConnectorCard>this.data.content).themeColor;
}
return this;
}
I update the Bot SDK to the latest version (3.13.0.3) and now whenever I try to use the method "GetTextWithoutMentions" I get the following exception:
activity.Text = Connector.Teams.ActivityExtensions.GetTextWithoutMentions(activity);
Microsoft.Bot.Connector.Teams
Method not found: 'System.Collections.Generic.IList`1<Microsoft.Bot.Connector.Entity> Microsoft.Bot.Connector.IMessageActivity.get_Entities()'.
at Microsoft.Bot.Connector.Teams.ActivityExtensions.GetTextWithoutMentions(IMessageActivity activity)
at Microsoft.Bot.Sample.LuisBot.MessagesController.d__0.MoveNext() in ...\Controllers\MessagesController.cs:line 36
The Class 'Activity' does contain a property public IList<Entity> Entities { get; set; }
Any idea about this?
Microsoft.Bot.Connector 3.13.0.3
Microsoft.Bot.Connector.Teams 0.8.0
One of our accounts started a customer request saying that some users didn't get a message from our bot, after doing some researches I noticed that 2 channels of the same team were returning different users (we're using fetchMembers
) is there a reason why 2 channels of the same team have more/less users? not sure if a user can change a configuration to not appear there.
I asked this user to remove one of the missing users from the team and then re-add the user, after one hour the user started appearing using fetchMembers
, but only that user, this channel has other 4 users that still don't appear, maybe this is helpful to detect the issue.
Thanks
Shouldn't the following export be changed as follows. Since Error
is not a nullable type you always have to send an error?
Current implementation
export type ComposeExtensionHandlerType =
(event: builder.IEvent, query: ComposeExtensionQuery,
callback: (err: Error, result: IComposeExtensionResponse, statusCode?: number)
=> void) => void;
Recommended:
export type ComposeExtensionHandlerType =
(event: builder.IEvent, query: ComposeExtensionQuery,
callback: (err: Error | null, result: IComposeExtensionResponse, statusCode?: number)
=> void) => void;
Current implementation gives the following TypeScript error when transpiling callback(null, ...)
: error TS2345: Argument of type 'null' is not assignable to parameter of type 'Error'.
Consider the following TypeScript code:
let msg = new msTeamsBuilder.TeamsMessage(session)
.textFormat(builder.TextFormat.markdown)
.text(": Retrieving incident IM10272...");
(msg as msTeamsBuilder.TeamsMessage).addMentionToText({id: "test", name: "@nat.infra"}, msTeamsBuilder.MentionTextLocation.PrependText);
In particular, note the goofy (msg as msTeamsBuilder.TeamsMessage)
cast before the botbuilder-teams addMentionToText method. If it's not there, it breaks, saying that addMentionToText
is not a method of botbuilder.Message
.
Which it isn't - it's a method of TeamsMessage
-- but why the error? Because with the Fluent-style APIs used in botbuilder, an explicit cast back to botbuilder.Message is made with every method call (in this case, to .textFormat
and .text
).
The only way around this, I think, is to create wrappers for all the fluent calls in the TeamsMessage.js library which calls super. That way the objects aren't cast back to the superclass type on every method call of botbuilder.
As it stands now, this is completely mysterious and makes the SDK harder to use.
I want to add a link in one email to let users access the 1:1 chat without having to search the private chat manually, the URL looks like https://teams.microsoft.com/_#/conversations/19:(aadObjectId_here)_(bot_id_here)@unq.gbl.spaces?ctx=chat
. Is there a way or an endpoint to get that info? or can I build a different URL without the aadObjectId
and access the 1:1 chat?
Thanks
The current signature for startReplyChain is prone to dev error, as what's conceptually the same information could be passed in multiple locations:
It would be better if the parameters to startReplyChain were parallel to startConversation.
startReplyChain(message: IMessage|IIsMessage, done: (err: Error, address?: IAddress) => void)
where the message's address contains all the necessary routing information.
Would it be possible to bump ms-rest
to the latest version ? Current one is using request 2.74 that uses a deprecated version of uuid
(node-uuid) ?
I'd like to ask about how to mention to channel or team in Microsoft Teams from Bot.
The following document says that such a type of mention is not supported.
“At this time, team and channel mentions are not supported.”
Is it not supported even now?
And do you have any plan to support this?
I'd like to make it possible to notify all of the members in a teams channel from Bot.
I am not able to add hero image as mentioned here since the heroImage
property is missing in class O365ConnectorCardSection
.
Hi,
Could you please add samples so that we could try out
https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/cards/cards-reference#list-card
Also i was unable to find the same in botbuilder-teams.d.js. Where is it defined ?
Thanks
So I developed this bot for my company that has a few features to make the employees' lives easier. But some of these features should only be accessible for a few of the employees. Is there anyway you would recommend doing this sort of authorization (checking if the user has access to the feature) without the need for a log in action?
I was thinking of using the "message.From.Id" attribute when the user sends his first message to see if that user in on an authorized-user-list, but I'm not 100% sure if this ID is unique and if it doesn't change over time. Any suggestions or insights?
The "Who"-Bot in Microsoft Teams is implementing a very useful autocompletion feature for Bot commands.
Here is how it looks:
Sadly, I don't see any way to do this currently, with any of the ChatConnectors or MS Teams libraries. Is there a way to use this? If not, would you consider implementing/exposing it?
Thank you!
Hello guys, I'm getting this error when trying to start a conversation with some users, I'd like to know if this is something ok because some user roles can't interact with bots or if there's something I can do to start a conversation with them.
These are the lines that throw the error https://github.com/Microsoft/BotBuilder/blob/master/Node/core/src/bots/ChatConnector.ts#L314-L321
Thanks :)
Hello,
Today we found something that now feels obvious but took us a while to figure out. When sending messages using startReplyChain
, non of the middlewares of the bot are used. This makes a lot of sense since startReplyChain is only a connector API.
We opened a pull request (microsoft/botframework-sdk#4120) to see if we can standardise this behaviour.
We want to know what are the opinions here to see how we can move forward and solve this issue. We will happily update our connectors https://github.com/suttna/botbuilder-slack and https://github.com/suttna/botbuilder-stride if we can find a common ground for the problem.
Thanks as usual for the support and time!
Hi,
Just started to play a bit with the preview Bot Framework v4. I was wondering will there be a Teams Bot Connector for Bot Framework v4 or is there a preview package available at this moment?
thanks in advance!
Peter
We having some complications in our application because we didn't cache all the team ids for the accounts that were created with our bot. We think it would be a really good idea to add an endpoint for getting the teams inside a tenant that a user belongs to.
Is this in the pipeline ? If not, could it be possible to add ?
I'm also aware of other people having similar issues with this as well.
I have a MS Teams bot that records the conversations happening in a group conversation. But of course I am aware that the MS teams bots can't do the group conversations as of now. The conversations need to mention the bot in order to record the conversation and I am recording the conversations in a documentdb document.
I need to push new conversation topics using a proactive dialog, all nice and fine but everytime I push a msg it lands in the same thread.
Is there a way to make sure everytime a new dialog is invoked it starts a new thread.
This is how I start a new dialog
// initiate a dialog proactively
function startProactiveDialog(address,txid,imageurl,textblurb) {
console.log(txid);
bot.beginDialog(address, "*:/conversationRecorder",[txid,imageurl,textblurb]);
}
Hi Folks,
I was trying out authentication for Microsoft Bot messages and noticed that user doesn't receives any notification / message / error when the request is rejected with HTTP 403 (forbidden).
User should be able to see something / error for that.
This issue is particular to MS-Teams channel. Works fine on emulator and webchat (tried these 3 so far).
User should be able to see some error message indicating the message wasn't sent/delivered
User is not able to see anything. It appears to user as if the message has been sent.
I would want to save it to a local session for reference to the bot that I'm making.
Hello guys, I've found one thing today playing with Guest users, when a tenant invites a guest user, fetchMembers
returns the user with neither a name nor an email, but when that user accepts the invitation, then fetchMembers
includes the name and email.
I'm saving a state from a result coming from API request on third-party API. When I access it using Dialog Context, it's not showing.
I'm trying to send a welcome message to a user when bot is added to MS teams for 1:1 chat. In this scenario user will be simply pasting BOT_Id in search bar on MS teams and bot should be visible for chat. As mentioned in following document I grabbed a code and modified for teamsAddMembers eventType but it does not work. In my case user has to wake up the bot by typing some command.
https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-notifications#nodejs
bot.on('conversationUpdate', (msg) => {
var members = msg.membersAdded;
if (!members) {
var members = msg.teamsAddMembers
}
// Loop through all members that were just added to the team
for (var i = 0; i < members.length; i++) {
// See if the member added was our bot
if (members[i].id.includes(connector.settings.appId)) {
var botmessage = new builder.Message()
.address(msg.address)
.text('Hello ! Welcome to CAL MS Teams Bot');
bot.send(botmessage, function (err) { });
}
}
});
I have a BOT with MS teams channel that is migrated from BF portal to azure couple of weeks back. It has Azure web app running behind where code is deployed. I manage all Bot settings in Azure now as on 31st March BF portal might go away. So far until 28th March my bot in MS teams was working fine. I have a screenshot attached.
This is enterprise level bot which will be used by almost 25k people and its currently under Non-prod UAT testing. The way I ask users to interact with is by sharing following link.
https://teams.microsoft.com/l/chat/0/0?users=28:{BOTID
Yesterday, I flipped the messaging endpoint URL to my local Ngrok url to test something. After that I realized BOT isn't responding in teams. I can confirm azure app service is running and I can test in 'Test we Chat window'. I even have Cortana channel working with same bot. If I flip the url back to azure endpoint still doesnt work. MS teams 100& stopped working. I tried with 2 more bots. No luck.
ToComposeExtensionAttachment()
extension method (e.g. https://github.com/OfficeDev/microsoft-teams-sample-get-started/blob/master/CSharp/TeamsToDoApp/Compose/ComposeExtension.cs).Self referencing loop detected for property 'preview' with type 'Microsoft.Bot.Connector.Attachment`
I suspect the cause of this issue is https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/blob/master/CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/AttachmentExtensions.cs#L60. If previewAttachment
is null which is the default, it references itself and this eventually will blow up on JSON serialization.
Don't use the extension method
var composeExtensionAttachment = new ComposeExtensionAttachment
{
Content = attachment.Content,
ContentType = attachment.ContentType,
ContentUrl = attachment.ContentUrl,
Name = attachment.Name,
ThumbnailUrl = attachment.ThumbnailUrl,
};
Using https://www.nuget.org/packages/Microsoft.Bot.Connector.Teams/0.5.6 but looking through the commit history, I suspect this issue has been there since the feature was introduced.
Hi,
No data is being send back to the bot when using Action.Submit in Adaptive cards.
new Activity().withType(ActivityTypes.MESSAGE).withRecipient(activity.from())
.withId(activity.id()).withFrom(activity.recipient())
.withAttachments(Arrays.asList(new Attachment()
.withContentType("application/vnd.microsoft.card.adaptive")
.withContent(new AdaptiveCard()
.withActions(Arrays.asList(new Submit().withTitle("Show Details")
.withData("{\"id\":229,\"name\":\"John\"}")))
.withBody(Arrays.asList(new Container().withItems(Arrays
.asList(new TextBlock().withText("Hello World"))))))));
When I try clicking on the button in webchat i get back a response but not in MS Teams.
Any solutions?
Thanks
Is there a functionality to reply to the message user sent to bot and like it ?
O365ConnectorCardActionBase class only contains type, name and id. When parsing json of specific derived type of actions, it would omit other fields.
My question related to MS teams compose extention
I have side loaded bot using json manifest containing
"composeExtensions": [ { "botId": "39b2dead-ccab-4b8c-8c5d-*********", "scopes": [ "personal", "team" ], "commands": [ { "id": "searchCmd", "title": "Search tasks", "initialRun": false, "description": "Search tasks", "parameters": [ { "name": "search", "title": "Search", "description": "Search tasks" } ] } ] } ],
I will explain use case step by step:
step 1: In channel conversion when user clicks on compose extension button there is bot in compose extension popup user clicks on that bot option then it will call bot api endpoint
step 2 : When bot api endpoint is called i.e. Compose extensions come in as Invokes to bot and bot responding in activity.IsComposeExtensionQuery() event then in the response of activity.IsComposeExtensionQuery() bot create some thumbnail cards CreateComposeExtensionResponse() method and send as response for compose extension such that,
` //Compose extensions come in as Invokes. Leverage the Teams SDK helper functions
if (activity.IsComposeExtensionQuery())
{
var invokeResponse = await new ComposeExtension(activity).CreateComposeExtensionResponse();
// Return the response
return Request.CreateResponse<ComposeExtensionResponse>(HttpStatusCode.OK, invokeResponse);
}`
Step 3 : Then user see there are some cards in compose extension popup send by bot as compose extension query response
Step 4 : Then User clicks on one of the card from compose extension popup and send it into channel conversation
Step 5 : As the conversation is initiated by user by selecting card from compose extension popup
Then that card is the first message of the conversion
Step 6 : There there is some discussion related to that card by users in that channel conversion but when one of the user in that channel discussion conversion ping like @MYBOT then **how can the bot knows which card from compose extension popup is selected for discussion ** because when on selecting the card from compose extension popup cards there is no call to bot.
i.e. I want information of that card taken for conversion when user ping @MYBOT from that conversion
please reply immediately
Guide on Possible solutions:
As that card is first message(thumbnail card) of the conversation discussion, I will get message id of that card message by activity.Conversation.Id but Is this possible that bot will get that card details by message Id or
Is there any other way to read that card message of conversation using message Id or
Is this possible to read that whole current conversation thread by bot
Is there any event when user select card from compose extension popup: So my bot can know which card is selected for discussion among multiple cards .
Bot not able read conversation thread initiated by user
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.