New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serverless-slack

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-slack - npm Package Compare versions

Comparing version 1.0.17 to 1.0.18

2

package.json
{
"name": "serverless-slack",
"description": "A Slack App Framework for AWS Lambda / Serverless.js",
"version": "1.0.17",
"version": "1.0.18",
"main": "src/index.js",

@@ -6,0 +6,0 @@ "author": "John Agan <john@slack-corp.com>",

@@ -41,3 +41,4 @@ 'use strict';

get channel() {
let payload = this.payload, event = payload.event;
let payload = this.payload;
let event = payload.event;
if (payload) {

@@ -58,3 +59,4 @@ if (payload.channel_id) return payload.channel_id;

get token() {
let auth = this.auth, bot = auth.bot;
let auth = this.auth;
let bot = auth.bot;
if (auth) return auth.bot ? auth.bot.bot_access_token : auth.access_token;

@@ -72,7 +74,16 @@ }

reply(message, ephemeral) {
// invalid ephemeral requests
if (!this.response_url && ephemeral) {
return Promise.reject("Message can't be ephemeral");
return Promise.reject("Message can't be private");
// slash commands and interactive messages
} else if (this.response_url) {
if (!ephemeral) message.response_type = 'in_channel';
return this.send(this.response_url, message);
// incoming webhooks
} else if (this.auth.incoming_webhook) {
return this.send(this.auth.incoming_webhook.url, message);
// fallback when not ephemeral
} else {

@@ -85,2 +96,13 @@ return this.say(message);

/**
* Send Private Reply
*
* @param {object} message - The message to reply with
* @return {Promise} A promise with the API response
*/
replyPrivate(message) {
return this.reply(message, true);
}
/**
* Send Message

@@ -87,0 +109,0 @@ *

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc