Commit 5f8f49a459a90ddeb40d2d56b445cdf319dc79f3
1 parent
fd31f25c10
Exists in
master
and in
1 other branch
modem.outgoing
Showing 2 changed files with 7 additions and 1 deletions Side-by-side Diff
config.sample.json
lib/modems.js
... | ... | @@ -14,8 +14,13 @@ exports.enabledModems = (arrayOfModem) => { |
14 | 14 | return modems.filter((modem) => !modem.disabled); |
15 | 15 | }; |
16 | 16 | |
17 | +exports.outgoingModems = (arrayOfModem) => { | |
18 | + const modems = arrayOfModem || config.modems || []; | |
19 | + return modems.filter((modem) => !modem.disabled && modem.outgoing); | |
20 | +}; | |
21 | + | |
17 | 22 | exports.randomModem = (arrayOfModem) => { |
18 | - const modems = this.enabledModems(arrayOfModem); | |
23 | + const modems = this.outgoingModems(arrayOfModem); | |
19 | 24 | const modemCount = modems.count; |
20 | 25 | |
21 | 26 | if (!modemCount) return null; |