about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2019-03-11Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/services/post_status_service.rb Small conflict due to handling of instance-local toots. A subsequent change is required to ensure instance-local polls are not leaked through Update.
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-08Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-03-08Fix setting up fields of a previously suspended account (#10222)ThibG
Fix #10177 for real
2019-03-08Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
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-06Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
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-05Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/models/status.rb - db/schema.rb Both conflicts are caused by us having extra database columns.
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-28Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
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-26Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - Dockerfile Took upstream version and reverted f13ebd02c91776ddb88b5178bf9015c6e0f1ca80. Hopefuly it's not needed anymore. - app/controllers/api/v1/search_controller.rb The conflict was due to us raising the number of results returned. Upstream raised it further, so took it. - config/locales/de.yml Took upstream changes to theme translation strings. - config/locales/gl.yml Took upstream changes to theme translation strings. - config/locales/nl.yml Took upstream changes to theme translation strings. - config/locales/sk.yml Took upstream changes to theme translation strings.
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-19Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
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-15Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-02-15Fix relay enabling/disabling not resetting inbox availability status (#10048)Eugen Rochko
Fix #10033
2019-02-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/oauth/authorized_applications_controller.rb Two changes too close to each other - app/controllers/settings/sessions_controller.rb - app/lib/user_settings_decorator.rb Two changes too close to each other - app/models/media_attachment.rb New changes too close to glitch-soc only changes. - app/models/user.rb Two changes too close to each other. - app/services/remove_status_service.rb Kept direct timeline code which had been removed upstream. - app/views/settings/preferences/show.html.haml Two changes too close to each other. - config/locales/en.yml Introduction of a new string too close to glitch-soc-only's “flavour” - config/locales/ja.yml Introduction of a new string too close to glitch-soc-only's “flavour” - config/locales/pl.yml Introduction of a new string too close to glitch-soc-only's “flavour” - config/locales/simple_form.en.yml Introduction of a new string too close to glitch-soc-only's “skin” - config/locales/simple_form.pl.yml Introduction of a new string too close to glitch-soc-only's “skin” - config/settings.yml Reverted upstream's decision of enabling posting application by default.
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-27Make storing and displaying application used to toot opt-inThibaut Girka
2019-01-26Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-01-25Fix SSO authentication not working due to missing agreement boolean (#9915)Eugen Rochko
Fix #9906
2019-01-19Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
No conflicts.
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-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - .eslintrc.yml Removed, as upstream removed it. - app/controllers/admin/statuses_controller.rb Minor code cleanup when porting one of our features. - app/models/account.rb Note length validation has changed upstream. We now use upstream's validation (dropped legacy glitch-soc account metadata stuff) but with configurable limit. - app/services/post_status_service.rb Upstream has added support for scheduled toots, refactoring the code a bit. Adapted our changes to this refactoring. - app/views/stream_entries/_detailed_status.html.haml Not a real conflict, changes too close. - app/views/stream_entries/_simple_status.html.haml Not a real conflict, changes too close.
2019-01-10Revert "Revert "Add handler for Move activity (#9629)""Thibaut Girka
This reverts commit bb96a7463758687f8187ae4483becd346c2482b3.
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.