candrholdings / slack-cli

A command line interface for Slack implemented using node.
https://candrholdings.github.io/slack-cli/
287 stars 31 forks source link

Error sending file to channel #22

Open glanzkinderbuild opened 7 years ago

glanzkinderbuild commented 7 years ago

When executing slackcli -h channel-name -f test.apk I get the error:

{ error: { err: 'pinning a file is not supported', message: undefined } }

apoorvparijat commented 7 years ago

I am facing the same problem.

tisrico commented 7 years ago

I am facing the same problem.

jaseemabbas commented 7 years ago

+1

codyc4321 commented 7 years ago

I have same issue. Sadly this makes a greatly promising repo useless for my purposes. I'd be happy to help the maintainer fix the issue


cchilders:~(master) 
$ slackcli -h general -f /tmp/cronlog.txt -m 'test'
error:  
{ error: { err: 'pinning a file is not supported', message: undefined } }

cchilders:~ (master) 
$ slackcli -h general -f '/tmp/cronlog.txt' -m 'test'
error:  
{ error: { err: 'pinning a file is not supported', message: undefined } }```
mcarifio commented 7 years ago

ditto. great utility, ty.

andrew-dixon commented 7 years ago

Not really an expert on this stuff but the issue appears to be that it is running the "pin" option even though it hasn't been selected, if you remove the "pin" code from the cmd.js file, starting here:

https://github.com/candrholdings/slack-cli/blob/master/bin/cmd.js#L327

and ending here:

https://github.com/candrholdings/slack-cli/blob/master/bin/cmd.js#L357

It will then upload files to channels. If you don't use the "pin" code you can do what I've done and just remove it, but that is not a great solution. I can't, however, see why it is running the "pin" code when the pin option has not been passed on the command line, someone with some better nodejs / javascript knowledge will probably know straightaway 😄