Skip to content

Commit

Permalink
candrholdingsGH-20 - Fix sending file to user
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel Corcuera committed Jan 25, 2017
1 parent ac1aa02 commit bcbc2c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ var cmd = function () {
});

}],
'uploadFile': [ 'groupId', 'channelId', function (callback, pipe) {
'uploadFile': [ 'groupId', 'channelId', 'userId', function (callback, pipe) {
logger.debug('uploadFile');

if (!options.file) {
return callback();
}
Expand All @@ -370,6 +370,9 @@ var cmd = function () {
else if (!options.group && options.channel) {
id = pipe.channelId;
}
else if(options.direct_message){
id = pipe.userId;
}

var formData = {
channel: id,
Expand Down Expand Up @@ -405,6 +408,9 @@ var cmd = function () {
else if (!options.group && options.channel) {
id = pipe.channelId;
}
else if(options.direct_message){
id = pipe.userId;
}

var form = {
channel: id,
Expand Down

0 comments on commit bcbc2c6

Please sign in to comment.