about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* Process incoming poll tallies update * Send Update on poll vote * Do not send Updates for a poll more often than once every 3 minutes * Include voters in people to notify of results update * Schedule closing poll worker on poll creation * Add new notification type for ending polls * Add front-end support for ended poll notifications * Fix UpdatePollSerializer * Fix Updates not being triggered by local votes * Fix tests failure * Fix web push notifications for closing polls * Minor cleanup * Notify voters of both remote and local polls when those close * Fix delivery of poll updates to mentioned accounts and voters
2019-03-08Fix setting up fields of a previously suspended account (#10222)ThibG
Fix #10177 for real
2019-03-08Do not allow adding votes to expired polls (#10214)ThibG
* Do not allow adding votes to expired polls * Only validate expires_at on create
2019-03-07Immediately display poll results to poll author (#10187)Eugen Rochko
* Immediately display poll results to poll author * Refactor Poll#loaded_options and add Poll#voted? to improve DRYness
2019-03-06Add optimistic lock to avoid race conditions when handling votes (#10196)ThibG
* Add optimistic lock to avoid race conditions when handling votes * Force-reload polls when getting `ActiveRecord::StaleObjectError`
2019-03-05Fix status creation API silently discarding invalid poll (#10171)Eugen Rochko
2019-03-05Fix suspended account's fields being set as empty dict instead of list (#10178)ThibG
Fixes #10177
2019-03-05Fix various issues in polls (#10165)Eugen Rochko
* Fix ActivityPub poll results being serialized even with hide_totals * Fix poll refresh button having a different font size * Display poll in OpenGraph description * Fix NoMethodError when serializing votes Regression from #10158 * Fix polls on public pages being broken for non-logged-in users * Do not show time remaining if poll has no expiration date
2019-03-05Fix featured tag form not failing on failed tag validations (#10167)Eugen Rochko
2019-03-05Fix poll options not being stripped of surrounding whitespace on save (#10168)Eugen Rochko
2019-03-04Store remote votes URI (#10158)ThibG
* Store remote votes URI * Add spec for accepting remote votes * Make poll vote id generation work the same way as follows
2019-03-04Make sure the poll is created before storing its id (#10142)ThibG
* Make sure the poll is created before storing its id * Fix updating poll results * Support fetching Question activities from the search bar
2019-03-03Add polls (#10111)Eugen Rochko
* Add polls Fix #1629 * Add tests * Fixes * Change API for creating polls * Use name instead of content for votes * Remove poll validation for remote polls * Add polls to public pages * When updating the poll, update options just in case they were changed * Fix public pages showing both poll and other media
2019-03-03Fix lists export (#10136)ThibG
2019-02-28Improved remote thread fetching (#10106)ThibG
* Fetch up to 5 replies when discovering a new remote status This is used for resolving threads downwards. The originating server must add a “replies” attributes with such replies for it to be useful. * Add some tests for ActivityPub::FetchRepliesWorker * Add specs for ActivityPub::FetchRepliesService * Serialize up to 5 public self-replies for ActivityPub notes * Add specs for ActivityPub::NoteSerializer * Move exponential backoff logic to a worker concern * Fetch first page of paginated collections when fetching thread replies * Add specs for paginated collections in replies * Move Note replies serialization to a first CollectionPage The collection isn't actually paginable yet as it has no id nor a `next` field. This may come in another PR. * Use pluck(:uri) instead of map(&:uri) to improve performances * Fix fetching replies when they are in a CollectionPage
2019-02-26Add type, limit, offset, min_id, max_id, account_id to search API (#10091)Eugen Rochko
* Add type, limit, offset, min_id, max_id, account_id to search API Fix #8939 * Make the offset work on accounts and hashtags search as well * Assure brakeman we are not doing mass assignment here * Do not allow paginating unless a type is chosen * Fix search query and index id field on statuses instead of created_at
2019-02-20correct opt-out showing application (#10086)Hinaloe
* correct opt-out showing application refs #9994 * Revert "correct opt-out showing application" This reverts commit 0e9bb70f145be42962416a6b87c08d59a2896486. * User#shows_application? calls wrong value
2019-02-19Fix crash when conversations have no valid participants (#10078)ThibG
* Never return empty participants for conversations Fixes #10068 * Fix client-side crash when conversations have no participants
2019-02-18Add domain search/filter to the "Federation" (/admin/instances) page (#10071)ThibG
2019-02-15Fix relay enabling/disabling not resetting inbox availability status (#10048)Eugen Rochko
Fix #10033
2019-02-04Use video filesize limit with gifv (#9924)rinsuki
2019-02-04Add featured hashtags to profiles (#9755)Eugen Rochko
* Add hashtag filter to profiles GET /@:username/tagged/:hashtag GET /api/v1/accounts/:id/statuses?tagged=:hashtag * Display featured hashtags on public profile * Use separate model for featured tags * Update featured hashtag counters on-write * Limit featured tags to 10
2019-02-03Add option to overwrite imported data (#9962)Eugen Rochko
* Add option to overwrite imported data Fix #7465 * Add import for domain blocks
2019-02-02Make displaying application used to toot opt-in (#9897)ThibG
* Make storing and displaying application used to toot opt-in * Revert to storing application info, and display it to the author via API
2019-02-02Create Redisable#redis (#9633)ysksn
* Create Redisable * Use #redis instead of Redis.current
2019-02-02Add WebP support (#9879)Acid Chicken (硫酸鶏)
* Add WebP support * Remove the changes to the tooltip refs: https://github.com/tootsuite/mastodon/pull/9879#pullrequestreview-199312528
2019-01-25Fix SSO authentication not working due to missing agreement boolean (#9915)Eugen Rochko
Fix #9906
2019-01-18Fix missing account association in tombstone model (#9857)Eugen Rochko
2019-01-18Add tombstones for remote statuses (#9830)ThibG
* Add Tombstone model to remember object deletion * Do not recreate a status if it has been deleted * Record Tombstone for remote deleted items Also, only record deleted items from same-host actors * Clear an user's tombstones when their key change
2019-01-18Add support for non-public reblogs from ActivityPub (#9841)Eugen Rochko
Fix #9838
2019-01-18Fix code style of regeneration-related code (#9843)Eugen Rochko
2019-01-08Redesign admin instances area (#9645)Eugen Rochko
2019-01-06Fix deleting a scheduled status immediately deleting media attachments (#9728)Eugen Rochko
2019-01-05Add scheduled statuses (#9706)Eugen Rochko
Fix #340
2019-01-05Use Contact User as Relay, Report, Subscribe. (#9661)Naoki Kosaka
* Use Contact User as Relay, Report, Subscribe. * Use Account.representative to fetch contact user. * Use find_local. * No reason to use Account.representative in subscribe_service. * Don't required representative! * Fallback is included in Account.representative method.
2019-01-05Change note length validation to ignore mention domains and URLs (#9717)Eugen Rochko
Fix #4419
2019-01-02Improve e-mail digest (#9689)Eugen Rochko
- Reduce time-to-digest from 20 to 7 days - Fetch mentions starting from +1 day since last login - Fix case when last login is more recent than last e-mail - Do not render all mentions, only 40, but show number in subject - Do not send digest to moved accounts - Do send digest to silenced accounts
2019-01-01Add CSV export for lists and domain blocks (#9677)Eugen Rochko
Fix #6893 Fix #9268
2018-12-29Add handler for Move activity (#9629)Eugen Rochko
2018-12-28Improve admin UI for account view (#9643)Eugen Rochko
2018-12-27Add local followers page to admin account UI (#9610)chr v1.x
* Add local followers page to admin account UI For moderation, I often find myself wondering who, locally, is following a remote user. Currently, to see this, I have to go back to the web UI, paste in their full handle, click their profile, and go to the "Followers" tab (plus, this information is incidental, and if mastodon ever decides to resolve all of the follower information, there will be no place local followers are shown). This PR adds a new page which is accessible via the "following" count on the admin's account view page, which shows the local followers. (It has filter parameters for account location to indicate that only local followers are shown, and leave room for expansion if mastodon ever decides to store the entire remote follow list). * Normalize en.yml
2018-12-26Fix scope latest of ReportNote (#9630)ysksn
2018-12-26Create DomainNormalizable#normalize_domain (#9631)ysksn
2018-12-25Remove Form::StatusBatch::ACTION_TYPE unused (#9623)ysksn
2018-12-24Add REST API for creating an account (#9572)Eugen Rochko
* Add REST API for creating an account The method is available to apps with a token obtained via the client credentials grant. It creates a user and account records, as well as an access token for the app that initiated the request. The user is unconfirmed, and an e-mail is sent as usual. The method returns the access token, which the app should save for later. The REST API is not available to users with unconfirmed accounts, so the app must be smart to wait for the user to click a link in their e-mail inbox. The method is rate-limited by IP to 5 requests per 30 minutes. * Redirect users back to app from confirmation if they were created with an app * Add tests * Return 403 on the method if registrations are not open * Require agreement param to be true in the API when creating an account
2018-12-22Add moderation warnings (#9519)Eugen Rochko
* Add moderation warnings Replace individual routes for disabling, silencing, and suspending a user, as well as the report update route, with a unified account action controller that allows you to select an action (none, disable, silence, suspend) as well as whether it should generate an e-mail notification with optional custom text. That notification, with the optional custom text, is saved as a warning. Additionally, there are warning presets you can configure to save time when performing the above. * Use Account#local_username_and_domain
2018-12-17Fix regression in #9539 (#9541)Eugen Rochko
2018-12-17Remove "most popular" tab from profile directory, add responsive design (#9539)Eugen Rochko
* Remove "most popular" tab from profile directory, add responsive design * Remove unused translations
2018-12-17Do no retry web push workers if the server returns a 4xx response (#9434)Eugen Rochko
Add timeout of 10s to web push requests
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