ms-teams-webhook
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -20,3 +20,3 @@ import { IncomingWebhookResult } from "./types"; | ||
* Send a notification to a conversation | ||
* @param message the message (a simple string, or an object describing the message) | ||
* @param message the message (object describing the message) | ||
*/ | ||
@@ -23,0 +23,0 @@ send(message: Payload): Promise<IncomingWebhookResult | undefined>; |
@@ -22,3 +22,3 @@ "use strict"; | ||
* Send a notification to a conversation | ||
* @param message the message (a simple string, or an object describing the message) | ||
* @param message the message (object describing the message) | ||
*/ | ||
@@ -28,2 +28,5 @@ async send(message) { | ||
let payload = message; | ||
if (typeof payload === "string") { | ||
throw new Error("Message must be a JSON object. Dont use a string or JSON.stringify() your message"); | ||
} | ||
try { | ||
@@ -30,0 +33,0 @@ const response = await this.axios.post(this.url, payload); |
{ | ||
"name": "ms-teams-webhook", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Library for using the Microsoft Teams Incomming Webhooks", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19657
92