about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2017-04-17Add gif auto-play/pause preferencePatrick Figel
This introduces a new per-user preference called "Auto-play animated GIFs", which is enabled by default. When a user disables this setting, gifs in toots become click-to-play. Previews of animated gifs were changed to display the video play button so that users can distinguish them from regular images. This setting also affects account avatars in the detailed account view, which was changed to use the same hover-to-play mechanism that is used for animated avatars in timelines. Fixes #1652
2017-04-16I18n health warnings (#1949)Matt Jankowski
* Rename admin.domain_block to admin.domain_blocks in prep for i18n improvement * Use implicit controller/action path for i18n in admin/domain_blocks * Add DomainBlock#accounts has_many * Avoid i18n health warning for `en` locale by using symbol scope with :count * Remove unused i18n key: plaintext_secret_html * Remove unused i18n key two_factor_auth.warning * Remove final will_paginate i18n keys * Remove unused key two_factor_auth.recovery_codes * Remove unused key: admin.reports.comment.none * Remove unused reports. i18n namespace (moved to admin.reports) * Ignore keys from locales which override activemodel and activerecord errors * Revert "Remove unused key: admin.reports.comment.none" This reverts commit 350ef2685fadc069e619bb6d1066190de195d942. * Update i18n key reference to match moved location * Add missing `en` keys to i18n * Tell i18n-tasks to ignore missing attributes that dont need overwriting * Add i18n-tasks unused to travis
2017-04-17Merge branch 'master' into fix/cache_blockingEffy Elden
2017-04-16Simplify the og:image and og:description code in stream_entries/show (#1934)Matt Jankowski
2017-04-16Remove .keep in models (#1892)tackeyy
2017-04-16Add presence validation to Import (#1928)alpaca-tc
``` *An* `ActiveRecord::StatementInvalid` *occurred while* `POST </settings/import>` *was processed by* `imports#create` Exception ---------------- PG::NotNullViolation: ERROR: null value in column "type" violates not-null constraint ```
2017-04-16Make file attachment on MediaAttachment optional (#1865)Eugen
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true Clean up old media files when creating a new domain block with reject_media set to true Return remote_url in media attachments API if local file is not present Undo domain block action in admin UI Ability to enable reject_media from admin UI
2017-04-16cache blockings for reducing queries.Keiji Yoshimi
2017-04-15Add recovery code support for two-factor auth (#1773)Patrick Figel
* Add recovery code support for two-factor auth When users enable two-factor auth, the app now generates ten single-use recovery codes. Users are encouraged to print the codes and store them in a safe place. The two-factor prompt during login now accepts both OTP codes and recovery codes. The two-factor settings UI allows users to regenerated lost recovery codes. Users who have set up two-factor auth prior to this feature being added can use it to generate recovery codes for the first time. Fixes #563 and fixes #987 * Set OTP_SECRET in test enviroment * add missing .html to view file names
2017-04-14Remove .keep in models (#1748)西小倉宏信
2017-04-14Admin reports controller improvements (#1714)Matt Jankowski
* Simplify admin/reports controller filtering for index * Rename parameter to resolved * Fix issue where reports view could not access filter_link_to * Add coverage for admin/reports controller * DRY up resolution of related reports for target account * Clean up admin/reports routes * Add Report#statuses method * DRY up current account action taken params * Rubocop styles
2017-04-13Admin accounts controller cleanup (#1664)Matt Jankowski
* Remove unused account_params method in admin/accounts controller * Introduce AccountFilter to find accounts * Use AccountFilter in admin/accounts controller * Use more restful routes admin silence and suspension area * Add admin/silences and admin/suspensions controllers
2017-04-13Settings export refactor (#1646)Matt Jankowski
* Refactor Export to take an account and know about the export types * Use Export instance in settings/exports#show
2017-04-12Allow import/export of mutes list (#1541)Matt Jankowski
* Allow export of mutes list * Allow importing of mutes list * Refactor to use Settings::Exports::BaseController and DRY up exports code
2017-04-11Refactor exports controller (#1567)Matt Jankowski
* Add basic coverage for settings/exports controller * Remove unused @account variable from settings/exports controller * Add coverage for download export actions * Remove deprecated `render :text` in favor of `send_data` for csv downloads * Add model to handle exports * Use Export class in settings/exports controller * Simplify settings/exports controller methods * Move settings/export to more restful routes
2017-04-11Merge branch 'master' of https://github.com/blackle/mastodon into blackle-masterEugen Rochko
2017-04-11Allow user to disable the boost confirm dialog in preferencesblackle
2017-04-11When avatar/header are GIF, generate static versions (#1428)Eugen
* When avatar/header are GIF, generate static versions. Account API returns "avatar"/"avatar_static", "header"/"header_static" Static version is the same as original for other cases Web UI de-animates avatars in toots, lists of users Fix #441, fix #596, prerequisite for #1064 * Fix JS test * Add rake task to generate static avatars/headers from GIF ones, add test
2017-04-10API param to exclude notification types from response (#1341)Eugen
* Add exclude_types param to /api/v1/notifications * Exclude notification types in web UI through exclude_types in the API
2017-04-10Clean up generation of account webfinger string (#1477)Matt Jankowski
* Consolidate webfinger string creation under Account#to_webfinger_s * Introduce Account#local_username_and_domain for consolidation
2017-04-09Fix #1339 - better Atom titles (#1343)Eugen
2017-04-09Search cleanup (#1333)Matt Jankowski
* Clean up SQL output in Tag and Account search methods * Add basic coverage for Tag.search_for * Add coverage for Account.search_for * Add coverage for Account.advanced_search_for
2017-04-08Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled (#1278)Eugen
* Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled TOTP secret is not shown again after 2FA is enabled * Clean up
2017-04-07DRY up reblog vs original status checkJoël Quenneville
Checking reblog vs original status was happening in multiple places across the app. For views, this logic was encapsulated in a helper method named `proper_status` but in the other layers of the app, the logic was duplicated. Because the logic is used at all layers of the app, we extracted it into a `Status#proper` method on the model and changed all uses of the logic to use this method. There is now a single source of truth for this condition. We added test coverage to untested methods that got refactored.
2017-04-07Rewrite Atom generation from stream entries to use Ox instead of Nokogiri ↵Eugen
(#1124) * Rewrite Atom generation from stream entries to use Ox instead of Nokogiri::Builder StreamEntry is now limited to only statuses, which allows some optimization. Removed extra queries on AccountsController#show. AtomSerializer instead of AtomBuilderHelper used in AccountsController#show, StreamEntriesController#show, StreamEntryRenderer and PubSubHubbub::DistributionWorker PubSubHubbub::DistributionWorker moves n+1 DomainBlock query to PubSubHubbub::DeliveryWorker instead. All Salmon slaps that aren't based on StreamEntry still use AtomBuilderHelper and Nokogiri * All Salmon slaps now use Ox instead of Nokogiri. No touch from status on account
2017-04-05Eliminate unnecessary queries and query clauses with none and allBrad Urani
2017-04-05fix rubocop issuesSamy KACIMI
2017-04-05add more tests to modelsSamy KACIMI
2017-04-04Only call regeneration worker after first login after a 14 day breakEugen Rochko
2017-04-04Fix ActionController::Parameters in API issueEugen Rochko
2017-04-03Add basic logging of who resolved reportEugen Rochko
2017-04-01Paperclip will complain on its own if this variable is missingEugen Rochko
2017-03-30Import feature for following/blocking lists (addresses #62, #177, #201, #454)Eugen Rochko
2017-03-30Add counter caches for a large performance increase on API requestsEugen Rochko
2017-03-22Fix full-text search query quotation, improve tag search performance with an ↵Eugen Rochko
index, add ability to open status by URL from search (fix #53)
2017-03-22Merge branch 'master' into feature-omnisearchEugen Rochko
this merge is necessary,
2017-03-22More efficient single account retrieval (0.9ms vs 50ms before)Eugen Rochko
2017-03-22New API method: /api/v1/searchEugen Rochko
Returns accounts, statuses, hashtags arrays
2017-03-18Federate header images, fix open-uri http->https redirection errorEugen Rochko
2017-03-17Make account search blazing fast and rank followers/followees higher in the ↵Eugen Rochko
results
2017-03-16Add method for retrieving triadic closuresEugen Rochko
2017-03-15Add "direct" visibility level in the backend. Web UI is not yetEugen Rochko
adjusted to allow choosing it, yet
2017-03-06Performance improvement for profilesEugen Rochko
2017-03-06Use more widely supported MP4 format for gifv'sEugen Rochko
2017-03-05Increase max bitrate of converted webms, slightly optimized counter queriesEugen Rochko
(Because postgres can tell that count(*) needs no extra checks, but counting a specific column requires them)
2017-03-05Add vsync -cfr option when converting gif to webmEugen Rochko
2017-03-05Higher quality webms? Might improve conversation of some types of gifsEugen Rochko
2017-03-05Detect videos with no sound, handle them like gifvEugen Rochko
2017-03-05Fix wrongful matching of last period in extended usernamesEugen Rochko
Fix anchor tags in some wikipedia URLs being matches as a hashtag
2017-03-05Improved /api/v1/accounts/:id/statuses with new params: only_media, ↵Eugen Rochko
exclude_replies Redirect /:username to /users/:username Redirect /:username/:id to /users/:username/updates/:id Updated API documentation and sponsors