Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

switch-bots

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

switch-bots - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

1

dist/client/baseClient.js

@@ -47,3 +47,2 @@ "use strict";

});
console.log(this._handlers);
}

@@ -50,0 +49,0 @@ onMessage(handler) {

@@ -325,3 +325,2 @@ "use strict";

.parseFromData(data, this);
console.log(message.commandParams);
await handler.fn(message);

@@ -328,0 +327,0 @@ }

7

dist/methods/message.js

@@ -26,2 +26,3 @@ "use strict";

}
requestData.inline_markup = requestData.inlineMarkup;
const message = await client.request(requestUrl, {

@@ -36,2 +37,6 @@ method: "POST",

const requestData = { ...params };
if (!requestData.id) {
requestData.id = messageId;
}
;
// Handle inline markup

@@ -112,3 +117,3 @@ if (requestData.inlineMarkup) {

async function getMessage(client, messageId) {
const response = await client.request(`${endpoints_1.Endpoints.CHAT_SERVICE_URL}/v1/message/${messageId}`, {
const response = await client.request(`${endpoints_1.Endpoints.CHAT_SERVICE_URL}/v1/message/findOne/${messageId}`, {
method: "GET",

@@ -115,0 +120,0 @@ });

@@ -44,5 +44,5 @@ "use strict";

static parseMessageFromJson(data, client) {
let message = data?.details
let message = data?.id ? data : (data?.details
? data["details"]["message"]
: data["message"];
: data["message"]);
const response = new Message({

@@ -57,3 +57,5 @@ message: message["message"],

response.personalChat = message["personalChat"];
response.sender = (0, user_1.parseSender)(data?.details ? data["details"]["sender"] : message["senderInfo"]);
if (data?.details?.sender || message.senderInfo) {
response.sender = (0, user_1.parseSender)(data?.details?.sender || message.senderInfo);
}
if (data?.details?.receiver) {

@@ -60,0 +62,0 @@ response.receiver = (0, user_1.parseSender)(data["details"]["receiver"]);

{
"name": "switch-bots",
"version": "1.0.1",
"version": "1.0.2",
"description": "Switch API TypeScript SDK for building bots and applications",

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

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