about summary refs log tree commit diff
path: root/app/controllers/api/v1
AgeCommit message (Collapse)Author
2020-11-29Only send curated Tavern posts to public timelineFire Demon
2020-11-29Simply Tavern curation checksFire Demon
2020-11-26Revert 5c4a7ea666, keep old Tavern curation behaviorFire Demon
2020-11-23Add user options to disable recipient verification, allow anonymous public ↵Fire Demon
access; rework private mode
2020-11-18Always use indirect federationFire Demon
2020-11-14Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-11-12Fix “Show boosts/replies in public timelines” only affecting streamingThibaut Girka
Fixes #1456
2020-11-07Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-11-04Add account sensitized (#14361)Takeshi Umeda
* Add account sensitized * Fix i18n normalize * Fix description and spec * Fix spec * Fix wording
2020-10-22Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-10-21Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `.github/dependabot.yml`: Updated upstream, we deleted it to not be flooded by Depandabot. Kept deleted. - `Gemfile.lock`: Puma updated on both sides, went for the most recent version. - `app/controllers/api/v1/mutes_controller.rb`: Upstream updated the serializer to support timed mutes, while glitch-soc added a custom API ages ago to get information that is already available elsewhere. Dropped the glitch-soc-specific API, went with upstream changes. - `app/javascript/core/admin.js`: Conflict due to changing how assets are loaded. Went with upstream. - `app/javascript/packs/public.js`: Conflict due to changing how assets are loaded. Went with upstream. - `app/models/mute.rb`: 🤷 - `app/models/user.rb`: New user setting added upstream while we have glitch-soc-specific user settings. Added upstream's user setting. - `config/settings.yml`: Upstream added a new user setting close to a user setting we had changed the defaults for. Added the new upstream setting. - `package.json`: Upstream dependency updated “too close” to a glitch-soc-specific dependency. No real conflict. Updated the dependency.
2020-10-13Add duration parameter to muting. (#13831)OSAMU SATO
* Adding duration to muting. * Remove useless checks
2020-10-12Add IP-based rules (#14963)Eugen Rochko
2020-10-10Only use boosts for default world timelineFire Demon
2020-10-10Hard delete unpublished statuses when "unpublish on delete" is not enabledFire Demon
2020-09-30Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-09-28Do not filter out temporarily-suspended accounts from relationships APIThibaut Girka
2020-09-28Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `Gemfile.lock`: Not a real conflict, upstream updated dependencies that were too close to glitch-soc-only ones in the file. - `app/controllers/oauth/authorized_applications_controller.rb`: Upstream changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's theming system. Ported upstream changes. - `app/controllers/settings/base_controller.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's theming system. Ported upstream changes. - `app/controllers/settings/sessions_controller.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's theming system. Ported upstream changes. - `app/models/user.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc not preventing moved accounts from logging in. Ported upstream changes while keeping the ability for moved accounts to log in. - `app/policies/status_policy.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's local-only toots. Ported upstream changes. - `app/serializers/rest/account_serializer.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's ability to hide followers count. Ported upstream changes. - `app/services/process_mentions_service.rb`: Upstream refactored and changed the logic surrounding suspended accounts. Minor conflict due to glitch-soc's local-only toots. Ported upstream changes. - `package.json`: Not a real conflict, upstream updated dependencies that were too close to glitch-soc-only ones in the file.
2020-09-21Drop Monsterfork v2 thread permissions; simplify feed filtersFire Demon
2020-09-21Fix not being able to enable status notifications in Web Push API (#14822)Eugen Rochko
2020-09-20Monsterfork v1-style curated Federated timelineFire Demon
2020-09-20Merge remote-tracking branch 'upstream/master' into merge-glitchFire Demon
2020-09-20[Bug] Explicitly include "unpublish_on_delete" setting in deletionsFire Demon
2020-09-18[Bug] Properly discard originals when redrafting in manual publishing modeFire Demon
2020-09-18Add option to be notified when a followed user posts (#13546)Eugen Rochko
* Add bell button Fix #4890 * Remove duplicate type from post-deployment migration * Fix legacy class type mappings * Improve query performance with better index * Fix validation * Remove redundant index from notifications
2020-09-17[Filters] Merge thread muting and hiding into a single actionFire Demon
2020-09-17[Timelines] Include local posts in Rowdy Tavern modeFire Demon
2020-09-15Change account suspensions to be reversible by default (#14726)Eugen Rochko
2020-09-11Change REST API to return empty data for suspended accounts (#14765)Eugen Rochko
2020-09-08Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/api/v1/timelines/public_controller.rb - app/lib/feed_manager.rb - app/models/status.rb - app/services/precompute_feed_service.rb - app/workers/feed_insert_worker.rb - spec/models/status_spec.rb All conflicts are due to upstream refactoring feed management and us having local-only toots on top of that. Rewrote local-only toots management for upstream's changes.
2020-09-08[Privacy, Port: glitch-soc@71b1d4c] Backend changes to allow handling ↵Thibaut Girka
local-only toots not based on emoji Co-authored-by: Fire Demon <firedemon@creature.cafe>
2020-09-08Monsterfork v2 Kaiju Commit 2020.06.27.1 - 2020.09.05.5Fire Demon
2020-09-07Changed tag most_used to recently_used (#14760)abcang
2020-09-07Refactor how public and tag timelines are queried (#14728)Eugen Rochko
2020-09-07Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict caused because we have additional code to make sure pinned local-only toots don't get rendered on the ActivityPub endpoints. Ported upstream changes.
2020-09-02Added account featured tags API (#11817)Takeshi Umeda
2020-09-01Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `config/webpack/shared.js`: Upstream has changed how Tesseract.js gets included and dropped a dependency. The conflict is caused by glitch-soc having different code due to its theming system. Ported upstream changes. - `lib/mastodon/version.rb`: Upstream refactor/code style change in a place we replaced upstream's repo URL with ours. Ported upstram changes, keeping our repo URL. - `yarn.lock`: Upstream dropped dependencies, one of which was textually too close to a glitch-soc-specific dependency. Not a real conflict.
2020-09-01Add configuration option to filter replies in lists (#9205)ThibG
* Add database support for list show-reply preferences * Add backend support to read and update list-specific show_replies settings * Add basic UI to set list replies setting * Add specs for list replies policy * Switch "cycling" reply policy link to a set of radio inputs * Capitalize replies_policy strings * Change radio button design to be consistent with that of the directory explorer
2020-08-31Make Array-creation behavior of Paginable more predictable (#14687)Akihiko Odaki
* Make Array-creation behavior of Paginable more predictable Paginable.paginate_by_id usually returns ActiveRecord::Relation, but it returns an Array if min_id option is present. The behavior caused problems fixed with the following commits: - 552e886b648faa2a2229d86c7fd9abc8bb5ff99c - b63ede5005d33b52266650ec716d345f166e2df0 - 64ef37b89de806f49cc59e011aa0ee2039c82c46 To prevent from recurring similar problems, this commit introduces two changes: - The scope now always returns an Array whether min_id option is present or not. - The scope is renamed to to_a_paginated_by_id to clarify it returns an Array. * Transform Paginable.to_a_paginated_by_id from a scope to a class method https://api.rubyonrails.org/classes/ActiveRecord/Scoping/Named/ClassMethods.html#method-i-scope > The method is intended to return an ActiveRecord::Relation object, which > is composable with other scopes. Paginable.to_a_paginated_by_id returns an Array and is not appropriate as a scope.
2020-08-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/accounts_controller.rb`: Upstream change too close to a glitch-soc change related to instance-local toots. Merged upstream changes. - `app/services/fan_out_on_write_service.rb`: Minor conflict due to glitch-soc's handling of Direct Messages, merged upstream changes. - `yarn.lock`: Not really a conflict, caused by glitch-soc-only dependencies being textually too close to updated upstream dependencies. Merged upstream changes.
2020-08-28Introduce ApplicationController#cache_collection_paginated_by_id (#14677)Akihiko Odaki
* Replace incorrect use of distinct with group Some uses of ActiveRecord::QueryMethods#distinct pass field names but they are incorrect for the current version of Rails. ActiveRecord::QueryMethods#group provides the expected behavior and benefits performance. See commit 6da24aad4cafdef8d8a2c92bac2002a5fc2fe9c8. * Introduce ApplicationController#cache_collection_paginated_by_id ApplicationController#cache_collection_paginated_by_id fuses ApplicationController#cache_collection and Paginable.paginate_by_id. An advantage of this method is that it prevents from modifying scope which Paginable.paginate_by_id may provide. ApplicationController#cache_collection always return an array and there is no possibility of the scope modification. It is also clear for a programmer, considering the implication of "cache". This method can also emit more efficient queries by using Cacheable.cache_ids before calling Paginable.paginate_by_id.
2020-08-28Eagerly load statuses with the main query in Api::V1::BookmarksController ↵Akihiko Odaki
(#14674) This is same with commit 552e886b648faa2a2229d86c7fd9abc8bb5ff99c except that it was for Api::V1::FavouritesController while this is for Api::V1::BookmarksController.
2020-08-28Replace incorrect use of distinct with group (#14675)Akihiko Odaki
Some uses of ActiveRecord::QueryMethods#distinct pass field names but they are incorrect for the current version of Rails. ActiveRecord::QueryMethods#group provides the expected behavior and benefits performance. See commit 6da24aad4cafdef8d8a2c92bac2002a5fc2fe9c8.
2020-08-28Eagerly load statuses with the main query in Api::V1::FavouritesController ↵Akihiko Odaki
(#14673) The old implementation had two queries: 1. The query constructed in Api::V1::FavouritesController#results 2. The query constructed in #cached_favourites, which is merged with 1. Both of them are issued againt PostgreSQL. The combination of the two queries caused the following problems: - The small window between the two queries involves race conditions. - Minor performance inefficiency. Moreover, the construction of query 2, which involves merging with query 1 has a bug. Query 1 is finalized with paginate_by_id, but paginate_by_id returns an array when min_id parameter is specified. The behavior prevents from merging the query, and in the real world, ActiveRecord simply ignores the merge (!), which results in querying the entire scan of statuses and favourites table. This change fixes these issues by simply letting query 1 get all the works done.
2020-08-25Use Status.group instead of Status.distinct in HashQueryService (#14662)Akihiko Odaki
DISTINCT clause removes duplicated records according to all the selected attributes. In reality, it can remove duplicated records only looking at statuses.id, but the clause confuses the query planner and yields insufficient performance. The behavior is also problematic if the scope produced by HashQueryService is used to query columns without id (using pluck method, for example). The scope is expected to contain unique statuses, but the uniquness will be evaluated with some arbitrary columns other than id. GROUP BY clause resolves those problem by explicitly specifying the column to take into account for the record distinction. A workaround for the problem of DISTINCT clause in Api::V1::Timelines::TagController is no longer necessary and removed.
2020-08-19Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-08-19Fix not being able to unbookmark toots when blocked by their author (#14604)ThibG
* Fix not being able to unbookmark toots when blocked by their author * Add tests
2020-07-25Fix local-only toots not being returned by the local TL APIThibaut Girka
Fixes #1389
2020-07-22Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/javascript/mastodon/actions/compose.js`: Not a “real” conflict, but change too close to a change we made to fix the vanilla WebUI locally pushing authored local-only toots in the public TL view.
2020-07-19Fix/14021 behaviour on add or remove toots (#14212)Ariel
* Add toot send by current user at local state after send a new toot Related to #14021 * Decrement toot counter at profile when remove a toot Related to #14021 * Remove semicolon at end of line