msteams-ruby-client icon indicating copy to clipboard operation
msteams-ruby-client copied to clipboard

add support for sections and potentialAction

Open jk444 opened this issue 4 years ago • 4 comments

add support for sections and potentialAction

jk444 avatar Apr 01 '21 09:04 jk444

{ "@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" }] }] }

jk444 avatar Apr 01 '21 09:04 jk444

Nice. Do you want to write code?

oooooooo avatar Apr 02 '21 11:04 oooooooo

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 ?

jk444 avatar Apr 08 '21 11:04 jk444

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

oooooooo avatar Apr 08 '21 14:04 oooooooo