add support for sections and potentialAction
add support for sections and potentialAction
{ "@type": "MessageCard", "@context": "http://schema.org/extensions", "themeColor": "0076D7", "summary": "Larry Bryant created a new task", "sections": [{ "activityTitle": "Larry Bryant created a new task", "activitySubtitle": "On Project Tango", "activityImage": "https://teamsnodesample.azurewebsites.net/static/img/image5.png", "facts": [{ "name": "Assigned to", "value": "Unassigned" }, { "name": "Due date", "value": "Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)" }, { "name": "Status", "value": "Not started" }], "markdown": true }], "potentialAction": [{ "@type": "ActionCard", "name": "Add a comment", "inputs": [{ "@type": "TextInput", "id": "comment", "isMultiline": false, "title": "Add a comment here for this task" }], "actions": [{ "@type": "HttpPOST", "name": "Add comment", "target": "https://docs.microsoft.com/outlook/actionable-messages" }] }, { "@type": "ActionCard", "name": "Set due date", "inputs": [{ "@type": "DateInput", "id": "dueDate", "title": "Enter a due date for this task" }], "actions": [{ "@type": "HttpPOST", "name": "Save", "target": "https://docs.microsoft.com/outlook/actionable-messages" }] }, { "@type": "OpenUri", "name": "Learn More", "targets": [{ "os": "default", "uri": "https://docs.microsoft.com/outlook/actionable-messages" }] }, { "@type": "ActionCard", "name": "Change status", "inputs": [{ "@type": "MultichoiceInput", "id": "list", "title": "Select a status", "isMultiSelect": "false", "choices": [{ "display": "In Progress", "value": "1" }, { "display": "Active", "value": "2" }, { "display": "Closed", "value": "3" }] }], "actions": [{ "@type": "HttpPOST", "name": "Save", "target": "https://docs.microsoft.com/outlook/actionable-messages" }] }] }
Nice. Do you want to write code?
This was an example of what I found. Now I tink it has to be adapted for your gem, can we open a branch to try it out ?
Can you fork and create a branch and pull request it? If it works, I'll be happy to merge it.
Here are the documents for sections and potentialAction. I'd like to have this feature, but I'm too lazy to get around to it. https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference