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

node-red-contrib-wazo-platform

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-wazo-platform - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

nodes/config.js

@@ -90,3 +90,3 @@ module.exports = function(RED) {

node.log('Session will expire, force Refresh Token');
client.forceRefreshToken();
node.client.forceRefreshToken();
}

@@ -93,0 +93,0 @@ }

@@ -50,17 +50,15 @@ module.exports = function (RED) {

const message_id = msg.payload.message_id;
const user_uuid = msg.payload.user_uuid;
node.status({fill:"blue", shape:"dot", text: 'Fetch voicemail'});
getVoicemail(voicemail_id, message_id);
getVoicemail(voicemail_id, message_id, user_uuid);
}
}
const getVoicemail = (voicemail_id, message_id) => {
conn.authenticate().then(data => {
if (data) {
let url = `https://${conn.host}:${conn.port}/api/calld/1.0/voicemails/${voicemail_id}/messages/${message_id}/recording?download=1`;
if (node.is_user) {
url = `https://${conn.host}:${conn.port}/api/calld/1.0/users/me/voicemails/messages/${message_id}/recording?download=1`;
}
getVoicemailRecording(url, voicemail_id, message_id, data.token, node);
}
});
const getVoicemail = async (voicemail_id, message_id, user_uuid) => {
const auth = await conn.authenticate();
let url = `https://${conn.host}:${conn.port}/api/calld/1.0/voicemails/${voicemail_id}/messages/${message_id}/recording?download=1`;
if (node.is_user) {
url = `https://${conn.host}:${conn.port}/api/calld/1.0/users/me/voicemails/messages/${message_id}/recording?download=1`;
}
getVoicemailRecording(url, voicemail_id, message_id, auth.token, node, user_uuid);
}

@@ -70,3 +68,3 @@

const getVoicemailRecording = (url, voicemail_id, message_id, token, node) => {
const getVoicemailRecording = (url, voicemail_id, message_id, token, node, user_uuid) => {
const options = {

@@ -102,2 +100,3 @@ method: 'GET',

payload: {
user_uuid: user_uuid,
buffer: buffer,

@@ -109,3 +108,4 @@ file: dest

node.send({
payload: buffer
payload: buffer,
user_uuid: user_uuid,
});

@@ -112,0 +112,0 @@ }

{
"name": "node-red-contrib-wazo-platform",
"version": "1.0.0",
"version": "1.0.1",
"description": "Node Red module for the Wazo Platform API",

@@ -5,0 +5,0 @@ "main": "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