We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7404e75 commit 962fa09Copy full SHA for 962fa09
lib/read.js
@@ -17,8 +17,10 @@ function processRead(msg, cfg) {
17
console.log('Incoming message is %j', msg);
18
if (!csvURL || csvURL.length == 0) {
19
// Now let's check for the attachment
20
- if (msg && msg.attachments && msg.attachments.length > 0) {
21
- csvURL = msg.attachments[0].url
+ if (msg && msg.attachments && Object.keys(msg.attachments).length > 0) {
+ var key = Object.keys(msg.attachments)[0];
22
+ console.log('Found attachment key=%s attachment=%j', key, msg.attachments[key]);
23
+ csvURL = msg.attachments[key].url;
24
} else {
25
console.error('URL of the CSV is missing');
26
that.emit('error', 'URL of the CSV is missing');
0 commit comments