Class: Nuntius::TeamsTeamsProvider
- Inherits:
-
BaseProvider
- Object
- BaseProvider
- Nuntius::TeamsTeamsProvider
- Defined in:
- app/providers/nuntius/teams_teams_provider.rb
Instance Attribute Summary
Attributes inherited from BaseProvider
Instance Method Summary collapse
Methods inherited from BaseProvider
all_settings, #callback, class_from_name, #initialize, #name, #refresh, setting_reader, states, transport
Constructor Details
This class inherits a constructor from Nuntius::BaseProvider
Instance Method Details
#deliver ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/providers/nuntius/teams_teams_provider.rb', line 7 def deliver # NOTE: Attachments are not supported # https://adaptivecards.io/designer/ # https://learn.microsoft.com/en-us/power-automate/overview-adaptive-cards # https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet args = (.payload || {}).merge(text: .text) response = Faraday.post([:to], JSON.dump(args), {"Content-Type": "application/json"}) .status = if response.status == 200 "sent" else "undelivered" end end |