microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
924 stars 288 forks source link

[`mgt-new-chat`] Sending cards as part of the conversation creation #2188

Open sebastienlevert opened 1 year ago

sebastienlevert commented 1 year ago

Developers should be able to send an adaptive card as the first message of a conversation.

Based on the following API call: https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http#example-3-send-message-containing-cards

createNewChat(memberIds, true, adaptiveCardMessage, true, chatName);
<NewChat
    hideInitialMessage={true}
    initialMessage={adaptiveCardMessage}
    initialMessageIsAdaptiveCard={true}
/>
ghost commented 1 year ago

Hello sebastienlevert, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

gavinbarron commented 1 year ago

@sebastienlevert is this handled by the existing component/function or do we need to add an async call back to the component which can be called between the creation of the thread and the sending of the first message if supplied?

sebastienlevert commented 1 year ago

It should be handled by the native component and functions. No callbacks needed.

gavinbarron commented 1 year ago

Can you please write me a spec or a more detailed explanation of how that will work in practice, how will the developer using the component pass in the card? Do we have docs or example code of adding a card to a newly created conversation? If the user chooses to have a message as well as a card are they separate messages? If so which comes first?

sebastienlevert commented 1 year ago

@gavinbarron I updated the description, please le me know if it becomes clearer. Thanks!