1. 26 Mar, 2018 1 commit
    • Akihiko Odaki's avatar
      Validate HTTP response length while receiving (#6891) · 40e5d230
      Akihiko Odaki authored
      to_s method of HTTP::Response keeps blocking while it receives the whole
      content, no matter how it is big. This means it may waste time to receive
      unacceptably large files. It may also consume memory and disk in the
      process. This solves the inefficency by checking response length while
  2. 21 Feb, 2018 1 commit
    • Eugen Rochko's avatar
      Fix avatar and header issues by using custom geometry detector (#6515) · a7171af0
      Eugen Rochko authored
      * Fix avatar and header issues by using custom geometry detector
      Revert a part of #6508. The file passed to dynamic styles method
      was not actually a file, but an instance of Paperclip::Attachment,
      which broke all styles by always returning {} from the method.
      One problem with GIF avatars was that Paperclip::GeometryDetector
      reported wrong dimensions for them, e.g. 120x120 GIF avatar would
      for some reason be detected as 120x53. By writing our own geometry
      parser, we can use FastImage, which also happens to be faster than
      ImageMagick, to detect image dimensions, which are also correct.
      Unfortunately, this PR does not implement skipping a `convert`
      entirely if the dimensions are already correct, as I found no easy
      way to write that behaviour into Paperclip without rewriting the
      Paperclip::Thumbnail class.
      * Only invoke convert if dimension or format needs to be changed
  3. 08 Dec, 2017 1 commit
  4. 07 Dec, 2017 1 commit
  5. 17 Nov, 2017 1 commit
    • Eugen Rochko's avatar
      Lists (#5703) · 24cafd73
      Eugen Rochko authored
      * Add structure for lists
      * Add list timeline streaming API
      * Add list APIs, bind list-account relation to follow relation
      * Add API for adding/removing accounts from lists
      * Add pagination to lists API
      * Add pagination to list accounts API
      * Adjust scopes for new APIs
      - Creating and modifying lists merely requires "write" scope
      - Fetching information about lists merely requires "read" scope
      * Add test for wrong user context on list timeline
      * Clean up tests
  6. 12 Nov, 2017 1 commit
  7. 25 Sep, 2017 1 commit
    • unarist's avatar
      Increase max height of preview card image (#5092) · 5c82c2b7
      unarist authored
      We added horizontal layout to preview card for wide image. However, max height of the thumbnail is still limited to 120px and it makes nearly square images to too small for that layout.
      This PR increases max height as well as max width.
  8. 01 Sep, 2017 1 commit
    • Eugen Rochko's avatar
      Make PreviewCard records reuseable between statuses (#4642) · 7dc50350
      Eugen Rochko authored
      * Make PreviewCard records reuseable between statuses
      **Warning!** Migration truncates preview_cards tablec
      * Allow a wider thumbnail for link preview, display it in horizontal layout (#4648)
      * Delete preview cards files before truncating
      * Rename old table instead of truncating it
      * Add mastodon:maintenance:remove_deprecated_preview_cards
      * Ignore deprecated_preview_cards in schema definition
      * Fix null behaviour
  9. 18 May, 2017 1 commit
  10. 02 May, 2017 1 commit
    • yhirano's avatar
      annotate models (#2697) · 298796cc
      yhirano authored
      * add annotate to Gemfile
      * rails g annotate:install
      * configure annotate_models
      * add schema info to models
      * fix rubocop to add frozen_string_literal
  11. 01 May, 2017 1 commit
  12. 27 Apr, 2017 1 commit
    • Eugen Rochko's avatar
      OEmbed support for PreviewCard (#2337) · 88725d6c
      Eugen Rochko authored
      * OEmbed support for PreviewCard
      * Improve ProviderDiscovery code failure treatment
      * Do not crawl links if there is a content warning, since those
      don't display a link card anyway
      * Reset db schema
      * Fresh migrate
      * Fix rubocop style issues
      Fix #1681 - return existing access token when applicable instead of creating new
      * Fix test
      * Extract http client to helper
      * Improve oembed controller
  13. 20 Jan, 2017 1 commit