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

@ebenos/messenger-adapter

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ebenos/messenger-adapter - npm Package Compare versions

Comparing version 4.0.0-alpha.7 to 4.0.0-alpha.8

36

build/messengerApi.js

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

return __awaiter(this, void 0, void 0, function* () {
const results = [];
for (const action of actions) {

@@ -40,27 +41,20 @@ const { delay = 0 } = action;

}
const results = [];
try {
if (action.body) {
const rsp = yield node_fetch_1.default(`${fbApiUrl}/me/messages?${token}`, {
body: JSON.stringify(action.body),
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
const json = yield rsp.json();
if (json.error && json.error.message) {
throw new Error(json.error.message);
if (action.body) {
const rsp = yield node_fetch_1.default(`${fbApiUrl}/me/messages?${token}`, {
body: JSON.stringify(action.body),
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
results.push(json);
continue;
});
const json = yield rsp.json();
if (json.error && json.error.message) {
console.log(json.error.message);
}
throw new Error('No body or token!');
results.push(json);
continue;
}
catch (err) {
console.log(err);
// TODO: Handle errors
throw err;
}
console.log('No body or token!');
}
return results;
});

@@ -67,0 +61,0 @@ }

{
"name": "@ebenos/messenger-adapter",
"version": "4.0.0-alpha.7",
"version": "4.0.0-alpha.8",
"description": "Facebook SendAPI Library for the Ebony framework.",

@@ -51,3 +51,3 @@ "main": "./build/index.js",

],
"gitHead": "71dedb975549e6a293d348bb55ad4f61ad9fa0b5"
"gitHead": "0b0187cbc9d8d4747483948122db052196d34029"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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