about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2018-03-27Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss app/models/media_attachment.rb
2018-03-26Validate HTTP response length while receiving (#6891)Akihiko Odaki
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 receiving.
2018-03-25Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-24Close http connection in perform method of Request class (#6889)Akihiko Odaki
HTTP connections must be explicitly closed in many cases, and letting perform method close connections makes its callers less redundant and prevent them from forgetting to close connections.
2018-03-20Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-20Use username/domain to match existing accounts in ActivityPub (#6842)Eugen Rochko
See also: #6837, #6667
2018-03-17Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-17Add entropy to download filenames (#6811)nightpool
pretty quick fix, and with the 1 week expiration i don't think we need to be too worried about the existing files closes #6798
2018-03-09Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-08For now, put a "." into no-text statuses with media for backcompat (#6691)Eugen Rochko
2018-03-08After blocking domain with reject_media, invalidate cache (#6679)Eugen Rochko
Media attachments are part of the association cache of statuses, since they are presumed to be immutable. Unless this cache is cleared manually, the statuses will continue to look like they have media embedded.
2018-03-07Remove text requirement when media attached from statuses (#6672)Eugen Rochko
2018-03-04Federate pinned statuses over ActivityPub (#6610)Eugen Rochko
* Federate pinned statuses over ActivityPub * Display pinned toots in web UI Fix #6117 * Fix migration * Fix tests * Update outbox_serializer.rb * Update remove_serializer.rb * Update add_serializer.rb * Update fetch_featured_collection_service.rb
2018-03-03Fix 500 while searching after deleting a post (#6604)Aboobacker MK
Fixes #6602
2018-03-02Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: README.md app/controllers/follower_accounts_controller.rb app/controllers/following_accounts_controller.rb app/serializers/rest/instance_serializer.rb app/views/stream_entries/_simple_status.html.haml config/locales/simple_form.ja.yml
2018-02-28Federated reports (#6570)Eugen Rochko
* Fix #2176: Federated reports * UI for federated reports * Add spec for ActivityPub Flag handler * Add spec for ReportService
2018-02-23Merge branch 'master' of https://github.com/tootsuite/mastodonimncls
# Conflicts: # app/controllers/settings/exports_controller.rb # app/models/media_attachment.rb # app/models/status.rb # app/views/about/show.html.haml # docker_entrypoint.sh # spec/views/about/show.html.haml_spec.rb
2018-02-21Account archive download (#6460)Eugen Rochko
* Fix #201: Account archive download * Export actor and private key in the archive * Optimize BackupService - Add conversation to cached associations of status, because somehow it was forgotten and is source of N+1 queries - Explicitly call GC between batches of records being fetched (Model class allocations are the worst offender) - Stream media files into the tar in 1MB chunks (Do not allocate media file (up to 8MB) as string into memory) - Use #bytesize instead of #size to calculate file size for JSON (Fix FileOverflow error) - Segment media into subfolders by status ID because apparently GIF-to-MP4 media are all named "media.mp4" for some reason * Keep uniquely generated filename in Paperclip::GifTranscoder * Ensure dumped files do not overwrite each other by maintaing directory partitions * Give tar archives a good name * Add scheduler to remove week-old backups * Fix code style issue
2018-02-17Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
Conflicts: Gemfile config/locales/simple_form.pl.yml
2018-02-15Fix #5173: Click card to embed external content (#6471)Eugen Rochko
2018-02-11Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-09Full-text search for authorized statuses (#6423)Eugen Rochko
* Add full-text search for authorized statuses - Search API will return statuses that match the query - Only for logged in users - Only if you are author of the status, - Or you were mentioned in it - Or you favourited or reblogged it - Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX` - Run `rails chewy:deploy` to create & populate index Fix #5880 Fix #4293 Fix #1152 * Add commented out docker-compose configuration for ES container * Optimize index import, filter search results * Add basic normalization to the index * Add better stemming and normalization to the index * Skip webfinger request if search query includes both @ and a space * Fix code style * Visually separate search result sections * Fix code style issues
2018-02-02Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss
2018-02-02Fix saving of oEmbed image (#6409)abcang
2018-01-24Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-22Rename ResolveRemoteAccountService to ResolveAccountService (#6327)Akihiko Odaki
The service used to be named ResolveRemoteAccountService resolves local accounts as well.
2018-01-22Rename FetchRemoteResourceService to ResolveURLService (#6328)Akihiko Odaki
The service used to be named FetchRemoteResourceService resolves local URL as well.
2018-01-18Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
2018-01-18When must_be_following_dm is on, only notify if recipient dm'ed user (#6283)Renato "Lond" Cerqueira
* When must_be_following_dm is on, only notify if recipient dm'ed user Currently, when must_be_following_dm is on, if a user sends a direct message replying to any status from the recipient, the recipient gets a notification. This should not be the case, as if the recipient posted something publicly this can be used to spam their notifications. * Refactor replied_to_status_is_direct_message? Following suggestion in PR
2018-01-17Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss
2018-01-17Fix home regeneration (#6251)Eugen Rochko
* Fix regeneration marker not being removed after completion * Return HTTP 206 from /api/v1/timelines/home if regeneration in progress Prioritize RegenerationWorker by putting it into default queue * Display loading indicator and poll home timeline while it regenerates * Add graphic to regeneration message * Make "not found" indicator consistent with home regeneration
2018-01-15Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-15Allow attributedTo in a status to be an embedded object (#6238)puckipedia
2018-01-08Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-08Fix bad URL schemes being accepted (#6219)Eugen Rochko
* Fix actors accepting invalid URI schemes or different host between URI and URL * Fix statuses accepting invalid URI scheme or different host to actor * Adjust tests to new requirements * Improve readability of mismatching_origin?/invalid_origin? methods
2018-01-05Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-05When fetching an ActivityPub-enabled status, do not re-request it as ↵ThibG
text/html (#6196)
2018-01-04Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-04Send one Delete of Actor in ActivityPub when account is suspended (#6172)Eugen Rochko
2018-01-04Fix FetchAtomService not finding alternatives if there's a Link header (#6170)Eugen Rochko
without them, such as is the case with GNU social Fixes the ability to find GNU social accounts via URL in search and when using remote follow function
2018-01-03Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-03Update moved-to property when it's removed too (#6160)Eugen Rochko
* Fix #6140 - Update moved-to property when it's removed too * Remove trailing whitespace
2017-12-22Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2017-12-22Reduce the number of synchronous resolves when posting toots (#6075)ThibG
2017-12-15Merge branch 'gs-master' into prevent-local-only-federationDavid Yip
Conflicts: db/schema.rb
2017-12-13Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2017-12-13Fix redundant HTTP request in FetchLinkCardService (#6002)Eugen Rochko
2017-12-13Fix #5952 - NameError (regression from #5762) (#5999)Eugen Rochko
* Fix #5952 - NameError (regression from #5762) * Fix
2017-12-12Store preview image for embedded photo in preview cards (#5986)Akihiko Odaki
The preview image would be useful to embed in timeline.
2017-12-12Return false if object does not respond to url (#5988)Renato "Lond" Cerqueira
Avoid error when the service returns a mostly valid oembed, but has no url in it, causing a MethodError: undefined method `url' for #<OEmbed::Response::Photo:0x000056505def9620>