lambtron / emojipacks

CLI to bulk upload emojis to your Slack
https://emojipacks.com
MIT License
1.32k stars 198 forks source link

Reenable emoji uploads for new api endpoint #155

Closed jackellenberger closed 6 years ago

jackellenberger commented 6 years ago

edit 2 This PR is fixed up and works again hooray edit ~~~There seems to be more at work here, i think something about the auth has changed 😞 In fact I think the issue is that the "add an emoji button" and therefore the emoji upload crumb is added via JS, meaning requests + cheerio isn't going to cut it.~~~

There don't appear to be any integration tests that would have caught this. I might look into making something like that possible.

jackellenberger commented 6 years ago

Okay! We dodged a bullet on this new emoji page - even though the /customize page is now JS based, we won't need selenium or similar to grab tokens / submit emoji - The endpoint has simply moved from "post to the /customize page" to an undocumented api endpoint at /api/emoji.add, much more in line with /api/emoji.list etc.

Apart from the move, there has been a change from client crumbs / cookies to user tokens, but luckily there is also a user token in embedded in every logged in client that we can grab until they patch that hole. There were also some small changes to what slack expects in its multipart upload form, but no big deal.

jackellenberger commented 6 years ago

Hey @lambtron (and maybe @zachfeldman?), we're gonna need this change to solve https://github.com/lambtron/emojipacks/issues/157 / allow any uploads to occur. Could you take a look at it?

zachfeldman commented 6 years ago

Hey @jackellenberger , I'm no longer involved with this project since I found out @lambtron profited from it without telling other contributors up front by opening up a store selling emojipacks.

Have a nice day and good luck with your PR!

lambtron commented 6 years ago

LGTM. Thank you!

patrickleet commented 6 years ago

was this released?

calvinjuarez commented 5 years ago

Is this on npm yet?