Socket
Socket
Sign inDemoInstall

@slack/client

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/client - npm Package Compare versions

Comparing version 3.12.0 to 3.13.0

.vscode/settings.json

8

lib/clients/helpers.js

@@ -40,2 +40,10 @@ /**

}
// For the web API, this should always be a JSON-encoded object, see:
// https://api.slack.com/methods/users.profile.set or https://api.slack.com/methods/users.profile.get
} else if (key === 'profile') {
if (isString(val)) {
target[key] = val;
} else {
target[key] = JSON.stringify(val);
}
} else if (key !== 'opts') {

@@ -42,0 +50,0 @@ target[key] = val;

1

lib/clients/web/facets/index.js

@@ -7,2 +7,3 @@ module.exports = {

ChatFacet: require('./chat.js'),
ConversationsFacet: require('./conversations.js'),
DndFacet: require('./dnd.js'),

@@ -9,0 +10,0 @@ EmojiFacet: require('./emoji.js'),

@@ -26,2 +26,4 @@ /**

* @param {Boolean} opts.presence_sub Support presence subscriptions on this socket connection.
* @param {Boolean} opts.include_locale Set this to `true` to receive the locale for users and
* channels. Defaults to `false`
* @param {Function} optCb Optional callback, if not using promises.

@@ -28,0 +30,0 @@ */

@@ -70,2 +70,4 @@ /**

* @param {?} opts.presence - Whether to include presence data in the output
* @param {?} opts.include_locale - Set this to `true` to receive the locale for users. Defaults to
* `false`
* @param {function=} optCb Optional callback, if not using promises.

@@ -72,0 +74,0 @@ */

2

package.json
{
"name": "@slack/client",
"version": "3.12.0",
"version": "3.13.0",
"description": "A library for creating a Slack client",

@@ -5,0 +5,0 @@ "main": "./index",

@@ -48,3 +48,3 @@ # Node Library for the Slack APIs

var url = process.env.SLACK_WEBHOOK_URL || ''; //see section above on sensitive data
var url = process.env.SLACK_WEBHOOK_URL || '';

@@ -73,3 +73,3 @@ var webhook = new IncomingWebhook(url);

var token = process.env.SLACK_API_TOKEN || ''; //see section above on sensitive data
var token = process.env.SLACK_API_TOKEN || '';

@@ -76,0 +76,0 @@ var web = new WebClient(token);

@@ -54,2 +54,11 @@ var expect = require('chai').expect;

it('JSON encodes user profile if it is not already encoded', function () {
var required = { profile: { status_text: 'testing', status_emoji: ':construction_worker:' } };
expect(helpers.getAPICallData('test', required, null)).to.be.deep.equal({
profile: '{"status_text":"testing","status_emoji":":construction_worker:"}',
token: 'test'
});
});
it('leaves attachments alone if they are already encoded', function () {

@@ -63,2 +72,13 @@ var required = { attachments: '["a","b","c"]' };

});
it('leaves user profile alone if it is already encoded', function () {
var required = { profile:
'{"status_text":"testing","status_emoji":":construction_worker:"}'
};
expect(helpers.getAPICallData('test', required, null)).to.be.deep.equal({
profile: '{"status_text":"testing","status_emoji":":construction_worker:"}',
token: 'test'
});
});
});

@@ -65,0 +85,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