bugfix: message + LICENSE

This commit is contained in:
Dave Horton
2021-07-21 12:37:23 -04:00
parent 99a6ffe56b
commit 02f5efba48
4 changed files with 10 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 jambonz
Copyright (c) 2021 Drachtio Communications Services, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -37,8 +37,7 @@ class TaskMessage extends Task {
const r = await lookupSmppGateways(accountSid);
let gw, url, relativeUrl;
if (r.length > 0) {
if (this.payload.provider) gw = r.find((o) => o.vc.name === this.payload.provider);
else gw = r[0];
gw = r.find((o) => 1 === o.sg.outbound && (!this.payload.provider || o.vc.name === this.payload.provider));
}
if (gw) {
this.logger.info({gw, accountSid}, 'Message:exec - using smpp to send message');

14
package-lock.json generated
View File

@@ -8,7 +8,7 @@
"version": "0.3.1",
"license": "MIT",
"dependencies": {
"@jambonz/db-helpers": "^0.6.12",
"@jambonz/db-helpers": "^0.6.13",
"@jambonz/mw-registrar": "^0.2.1",
"@jambonz/realtimedb-helpers": "^0.4.1",
"@jambonz/stats-collector": "^0.1.5",
@@ -376,9 +376,9 @@
}
},
"node_modules/@jambonz/db-helpers": {
"version": "0.6.12",
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.6.12.tgz",
"integrity": "sha512-AZB8iMqLpFhT1xcViQSmXpjzO8FWnW2DXaPcDHnZO0uhrAS+8OSpU1tBdl4p6yHwPQ8CEONyMIpF86tltnLpOg==",
"version": "0.6.13",
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.6.13.tgz",
"integrity": "sha512-7VXb1q8Jii76XFYMyIjsLr33w5s1DFUN1fjtU+r5PpZQuM7YXhVHfOW3q0652RMrEP2vqW2h6cpBNclvLPJzjg==",
"dependencies": {
"cidr-matcher": "^2.1.1",
"debug": "^4.3.1",
@@ -5046,9 +5046,9 @@
"dev": true
},
"@jambonz/db-helpers": {
"version": "0.6.12",
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.6.12.tgz",
"integrity": "sha512-AZB8iMqLpFhT1xcViQSmXpjzO8FWnW2DXaPcDHnZO0uhrAS+8OSpU1tBdl4p6yHwPQ8CEONyMIpF86tltnLpOg==",
"version": "0.6.13",
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.6.13.tgz",
"integrity": "sha512-7VXb1q8Jii76XFYMyIjsLr33w5s1DFUN1fjtU+r5PpZQuM7YXhVHfOW3q0652RMrEP2vqW2h6cpBNclvLPJzjg==",
"requires": {
"cidr-matcher": "^2.1.1",
"debug": "^4.3.1",

View File

@@ -26,7 +26,7 @@
"jslint": "eslint app.js lib"
},
"dependencies": {
"@jambonz/db-helpers": "^0.6.12",
"@jambonz/db-helpers": "^0.6.13",
"@jambonz/mw-registrar": "^0.2.1",
"@jambonz/realtimedb-helpers": "^0.4.1",
"@jambonz/stats-collector": "^0.1.5",