about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2018-12-11Add instance-wide setting to disable profile directory (#9497)ThibG
* Add instance-wide setting to disable profile directory Fixes #9496 When the profile directory is disabled: - The “discoverable” setting is hidden from users - The “profile directory” link is not shown on public pages - /explore returns 404 * Move Setting.profile_directory check to a before_action filter
2018-12-11Make custom emoji domains case insensitive #9351 (#9474)Adam Copp
* Make custom emoji domains case sensitive #9351 * Fixup style in downcase_domain to comply with codeclimate. * switch if! to unless * Don't use transactions, operate in batches. Also revert spurious schema change.
2018-12-10Improve e-mail MX validator and add tests (#9489)Eugen Rochko
2018-12-09Add setting to not aggregate reblogs (#9248)ThibG
* Add setting to not aggregate reblogs Fixes #9222 * Handle cases where user is nil in add_to_home and add_to_list * Add hint for setting_aggregate_reblogs option * Reword setting_aggregate_reblogs label
2018-12-08Cache hashtag sample accounts, and exclude ineligible ones (#9465)Eugen Rochko
2018-12-07Fix various things in the directory (#9449)Eugen Rochko
* Fix missing variable in directory page title * Order hashtags by number of people instead of alphabetically * Add icon to OpenGraph preview of directory page * Prevent line breaks in hashtags and ensure lowercase in the table
2018-12-07Fix tag mb_chars comparison of profile directory (#9448)Takeshi Umeda
2018-12-06Add profile directory (#9427)Eugen Rochko
Fix #5578
2018-12-05Attempt fixing deadlocks by moving account stats update outside transaction ↵ThibG
(#9437) * Use `update_column` instead of `update_attribute` in callback `update_attribute` would normally cause callbacks to be called. Called from a callback, it seems to stop further callbacks from executing. `update_column` does the same work, but without calling callbacks or preventing other callbacks from executing. * Fix deadlocks by moving account stats update outside transaction
2018-12-03Improve account suspension speed and completeness (#9290)Eugen Rochko
- Some associations were missing from the clean-up - Some attributes were not reset on suspension - Skip federation and streaming deletes when purging a dead domain - Move account association definitions to concern
2018-11-27Change identities id column to a bigint (#9371)Eugen Rochko
* fix: change Identity's id column to a bigint This appears to be the last model created using a 5.0 migration, where column types defaulted to `integer` rather than `bigint`. This migration changes the column type to match that of all of the other ID columns. * Change user_id column in identities to bigint and fix down-migration
2018-11-27Allow hyphens in the middle of remote user names (#9345)ThibG
Fixes #9309 This only allows hyphens in the middle of a username, much like dots, although I don't have a compelling reason to do so other than keeping the changes minimal.
2018-11-27add loglevel to ffmpeg in gif upload (#9368)Hugo Gameiro
2018-11-26Redesign admin accounts index (#9340)Eugen Rochko
* Improve overview of accounts in admin UI - Display suspended status, role, last activity and IP prominently - Default to showing local accounts - Default to not showing suspended accounts * Remove unused strings * Fix tests * Allow filtering accounts by IP mask
2018-11-25Ensure replied-to is a status not a boost (#9129)valerauko
* Ensure replied-to is a status not a boost * Consider case of not a reply * Add test case for replying to boost * Move reblog-reply resolution to model * Remove unnecessary comment
2018-11-24Sort self-replies to the top of descendants (#9320)Eugen Rochko
Fix #6463
2018-11-23Revert "Sort self-replies to the top of the thread (#9296)" (#9335)Eugen Rochko
This reverts commit 074960bb0fa59664c0ae1a35ef80301f5033700d. Fix #9315
2018-11-19Extract counters from accounts table to account_stats table (#9295)Eugen Rochko
2018-11-16Sort self-replies to the top of the thread (#9296)Eugen Rochko
Fix #6463
2018-11-16Remove intermediary arrays when creating hash maps from results (#9291)Eugen Rochko
2018-11-05Allow joining several hashtags in a single column (#8904)James Kiesel
* Nascent tag menu on frontend * Hook up frontend to search * Tag intersection backend first pass * Update yarnlock * WIP * Fix for tags not searching correctly * Make radio buttons function * Simplify radio buttons with modeOption * Better naming * Rearrange options * Add all/any/none functionality on backend * Small PR cleanup * Move to service from scope * Small cleanup, add proper service tests * Don't use send with user input :D * Set appropriate column header * Handle auto updating timeline * Fix up toggle function * Use tag value correctly * A bit more correct to use 'self' rather than 'all' in status scope * Fix some style issues * Fix more code style issues * Style select dropdown more better * Only use to_id'ed value to ensure no SQL injection * Revamp frontend to allow for multiple selects * Update backend / col header to account for more flexible tagging * Update brakeman ignore * Codeclimate suggestions * Fix presenter tag_url * Implement initial PR feedback * Handle additional tag streaming * CodeClimate tweak
2018-10-28Reset status cache when status_stat or media_attachment updates (#9119)Eugen Rochko
* Reset status cache when status_stat or media_attachment updates Fix #8711 Media attachments are generally immutable, but admins can update the sensitive flag, and this would ensure the change is visible instantly. Same for updates to status stats. That is a regression from #8185, because even the correct updated_at fetched from a join doesn't seem to invalidate the cache. * Remove join from Status#cache_ids since it has no effect
2018-10-28Include preview cards in status entity in REST API (#9120)Eugen Rochko
* Include preview cards in status entity in REST API * Display preview card in-stream * Improve in-stream display of preview cards
2018-10-25Migrate all old direct messages to new conversations schema (#9085)Eugen Rochko
2018-10-20Add option to block reports from domain (#8830)Eugen Rochko
2018-10-19Add unread indicator to conversations (#9009)Eugen Rochko
2018-10-17Do not show "limited" visibility in default visibility preference (#8999)Eugen Rochko
* Do not show "limited" visibility in default visibility preference Fix regression from #8950 * Fix code style issue
2018-10-17Improve support for aspects/circles (#8950)Eugen Rochko
* Add silent column to mentions * Save silent mentions in ActivityPub Create handler and optimize it Move networking calls out of the database transaction * Add "limited" visibility level masked as "private" in the API Unlike DMs, limited statuses are pushed into home feeds. The access control rules between direct and limited statuses is almost the same, except for counter and conversation logic * Ensure silent column is non-null, add spec * Ensure filters don't check silent mentions for blocks/mutes As those are "this person is also allowed to see" rather than "this person is involved", therefore does not warrant filtering * Clean up code * Use Status#active_mentions to limit returned mentions * Fix code style issues * Use Status#active_mentions in Notification And remove stream_entry eager-loading from Notification
2018-10-08rubocop issues - Cleaning up (#8912)ashleyhull-versent
* cleanup pass * undo mistakes * fixed. * revert
2018-10-07Add conversations API (#8832)Eugen Rochko
* Add conversations API * Add web UI for conversations * Add test for conversations API * Add tests for ConversationAccount * Improve web UI * Rename ConversationAccount to AccountConversation * Remove conversations on block and mute * Change last_status_id to be a denormalization of status_ids * Add optimistic locking
2018-10-04Limit the number of people that can be followed from one account (#8807)Eugen Rochko
Configurable soft limit of 7,500, and above that, configurable ratio of 1.1 * followers, controlled by: - MAX_FOLLOWS_THRESHOLD - MAX_FOLLOWS_RATIO Fix #2311
2018-10-04Change admin accounts default sort to most recent (#8813)Eugen Rochko
2018-10-04Fix link verification for remote accounts (#8868)Eugen Rochko
2018-09-29Fix timeline pagination (#8827)Eugen Rochko
Ruby's ** operator does not play well with non-Hash objects, which the params slice is Fix #8821
2018-09-28Support min_id-based pagination in REST API (#8736)Eugen Rochko
* Allow min_id pagination in Feed#get * Add min_id pagination to home and list timeline APIs * Add min_id pagination to account statuses, public and tag APIs * Remove unused stub in reports API * Use min_id pagination in notifications, favourites, and fix order * Fix HomeFeed#from_database not using paginate_by_id
2018-09-25Add a new preference to always hide all media (#8569)ふぁぼ原
2018-09-24Add user preference to always expand toots marked with content warnings (#8762)Matt Sweetman
2018-09-18Fix performance regression in Account::Field#verifiable? (#8719)Eugen Rochko
* Fix performance regression in Account::Field#verifiable? Regression from #8703 * Fix code style issue
2018-09-18Redesign forms, verify link ownership with rel="me" (#8703)Eugen Rochko
* Verify link ownership with rel="me" * Add explanation about verification to UI * Perform link verifications * Add click-to-copy widget for verification HTML * Redesign edit profile page * Redesign forms * Improve responsive design of settings pages * Restore landing page sign-up form * Fix typo * Support <link> tags, add spec * Fix links not being verified on first discovery and passive updates
2018-09-14Misc. typos (#8694)luzpaz
Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
2018-09-02Add preference for report notification e-mails, skip for duplicates (#8559)Eugen Rochko
If an unresolved report for the same target account already exists, no new notification is generated
2018-08-29Fix nil host in remotable (#8508)Renato "Lond" Cerqueira
Host can be nil in urls like 'https:https://example.com/path/file.png'
2018-08-26Fix low-hanging rubocop gripes (#8458)Quint Guvernator
* rubocop: quit being so picky * rubocop: miscellany * rubocop: prefer present to blank
2018-08-24Add admin custom CSS setting (#8399)Eugen Rochko
Fix #3894
2018-08-23Allow mods to disable login, improve message when login disabled (#8329)Eugen Rochko
* Allow moderators to disable/enable login * Instead of rejecting login, show forbidden error when login disabled Avoid confusion because when login is rejected, the message is that the account is not activated, which is wrong. * Fix tests
2018-08-23Add ability to change an instance default theme from the administration ↵Jakub Mendyk
panel (#7092) (#8381) * Add default_settings class method to ScopedSettings ScopedSettings was extended to use value of unscoped setting instead of only using defaults set in config/settings.yml for selected settings. This adds possibility for admins to set default values of users' settings, for example default theme (as requested in #7092). * Add ability to change an instance default theme Closes #7092
2018-08-22exclude-other-silenced-accounts (#7528)masarakki
2018-08-22Add confirmation step to account suspensions (#8353)Eugen Rochko
* Add confirmation page for suspensions * Suspension confirmation closes reports, linked from report UI * Fix tests
2018-08-21Get rid of all batch order warnings (#8334)Eugen Rochko
2018-08-21Remove annoying Notification#cache_ids scope warning (#8333)Eugen Rochko