Closed jackellenberger closed 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.
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?
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!
LGTM. Thank you!
was this released?
Is this on npm yet?
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.~~~
The emoji customize page has had another rewrite that removes the segmentation from the top "addemoji" section and the bottom "emojilist" section.
With this upstream change, the existing code would always throw a login error:
Simply updating the selector to not require the existance of an "addemoji" section is enough to allow uploads to continue
There don't appear to be any integration tests that would have caught this. I might look into making something like that possible.