Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redirects on avatarUrl downloading #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

caldwell
Copy link

The example avatar that the bot uses (http://i.imgur.com/IDOBtEJ.png) is a redirect from imgur now. This wasn't handled and the code tried to upload a zero length avatar which failed. This patch redoes the http fetch using the "request" library (which was already required). This handles the redirects by default and was a little shorter to boot.

I also included another commit which fixes a deprecation message that the matrix-js-sdk was printing:

Returning the raw JSON from uploadContent(). Future versions of the js-sdk will change this default, to return the parsed object. Set opts.rawResponse=false to change this behaviour now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant