@guardian/anghammarad
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -29,2 +29,3 @@ import { SNS } from "aws-sdk"; | ||
client?: SNS; | ||
threadKey?: string; | ||
} |
@@ -29,9 +29,6 @@ "use strict"; | ||
messageJson(params) { | ||
return JSON.stringify({ | ||
message: params.message, | ||
sender: params.sourceSystem, | ||
channel: params.channel, | ||
target: params.target, | ||
actions: params.actions, | ||
}); | ||
const { message, sourceSystem, channel, target, actions, threadKey } = params; | ||
return JSON.stringify(Object.assign({ message, sender: sourceSystem, channel, | ||
target, | ||
actions }, (threadKey && { threadKey }))); | ||
} | ||
@@ -38,0 +35,0 @@ notify(params) { |
{ | ||
"name": "@guardian/anghammarad", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "Notification service for the Guardian's dev teams", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/main.js", |
@@ -33,2 +33,3 @@ import { SNS } from "aws-sdk"; | ||
client?: SNS; | ||
threadKey?: string; | ||
} |
@@ -13,8 +13,18 @@ import { NotifyParams } from "./interfaces"; | ||
messageJson(params: NotifyParams): string { | ||
const { | ||
message, | ||
sourceSystem, | ||
channel, | ||
target, | ||
actions, | ||
threadKey | ||
} = params | ||
return JSON.stringify({ | ||
message: params.message, | ||
sender: params.sourceSystem, | ||
channel: params.channel, | ||
target: params.target, | ||
actions: params.actions, | ||
message, | ||
sender: sourceSystem, | ||
channel, | ||
target, | ||
actions, | ||
...(threadKey && { threadKey }), // only add "threadKey" when it is defined | ||
}); | ||
@@ -21,0 +31,0 @@ } |
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
20720
348