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 JSON serialization of media_attachment (regression from #4090) #4111

Merged
merged 1 commit into from
Jul 8, 2017

Conversation

unarist
Copy link
Contributor

@unarist unarist commented Jul 8, 2017

{
  "id":20,
  "type":"image",
  "url":"http://localhost:3000/system/media_attachments/files/000/000/020/original/501dc585d56426dd.png?1499464144",
  "preview_url":"http://localhost:3000/system/media_attachments/files/000/000/020/small/501dc585d56426dd.png?1499464144",
  "remote_url":"",
  "text_url":"http://localhost:3000/media/20",
  "meta":{ ... }
}

text_url should be https://.../media/{shortcode}, not https://.../media/{id}. Also it should be nil if it's remote resource (it throws Exception due to lack of shortcode).

@ykzts ykzts self-requested a review July 8, 2017 04:09
@unarist unarist added the bug Something isn't working label Jul 8, 2017
@ykzts ykzts added the api REST API, Streaming API, Web Push API label Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants