Commit Graph

332 Commits (1c335ac53a98c0f4f97a0ce5c8166cd2285c02ad)

Author SHA1 Message Date
Eugen Rochko d3f3810fe1
Fix unserialized `role` on account entities in admin API ()
Claire 13a2abacc8
Add `roles` attribute to Account entities in REST API ()
Claire 448be26b34
Add missing `policy` attribute to `WebPushSubscriptionSerializer` ()
* Add missing `policy` attribute to `WebPushSubscriptionSerializer`

Fixes 

* Add tests
Claire 3970a6f433
Add option to make the landing page be /about even when trends are enabled ()
* Add option to make the landing page be /about even when trends are enabled

* Restablish /explore as landing page by default
Claire 0405be69d2
Fix REST API serializer for Account not including `moved` when the moved account has itself moved ()
Instead of cutting immediately, cut after one recursion.
Jed Fox 0e7549b82d
Add `reading:autoplay:gifs` to /api/v1/preferences ()
Claire 70415714f1
Add follow request banner on account header ()
* Add requested_by to relationship maps

* Display whether an account has requested to follow you on their profile
Matthías Páll Gissurarson 1e95fa3df5
Fix punycoded local domains not being prettified in initial state ()
Chris Johnson 413481f953
Add maskable icon support for Android ()
* Add maskable icon support for Android

* Update manifest_serializer.rb

* Fix linting issue
Claire c476dfc725
Fix nodeinfo metadata attribute being an array instead of an object ()
Fixes 
trwnh c374729225
Add `sensitized` to Admin::Account serializer (fix ) ()
* Add `sensitized` to Admin::Account serializer (fix )

* remove whitespace, please linter
trwnh 455a754081
Fix missing cast of status and rule IDs to string (fix ) ()
Eugen Rochko d54e7ee61e
Fix n+1 queries when rendering initial state JSON ()
Claire 312d616371
Change sign-in banner to reflect disabled or moved account status ()
Eugen Rochko 09f04d710d
Change `closed_registrations_message` to `message` and add Markdown ()
Claire 2277913f3f
Add closed registrations modal ()
Claire 30453fab80
Add mention of the translation provider when translating a post ()
Claire 8046cf34d6
Change “Translate” button to only show up when a translation backend is configured ()
* Change “Translate” button to only show up when a translation backend is configured

Fixes 

* Add `translation` attribute to /api/v2/instance to expose whether the translation feature is enabled

Fixes 
Eugen Rochko 1fd6460b02
Change floating action button to be a button in header in web UI ()
- Fix theme color
- Fix elephant being too big on error page on small screens
- Remove "Follows and Followers" link from navigation panel
Eugen Rochko c2c14331b2
Fix PWA manifest using `/web` paths ()
Takeshi Umeda 74ead7d106
Change featured tag updates to add/remove activity ()
* Change featured tag updates to add/remove activity

* Fix to check for the existence of feature tag

* Rename service and worker

* Merge AddHashtagSerializer with AddSerializer

* Undo removal of sidekiq_options
Eugen Rochko 7c152acb2c
Change settings area to be separated into categories in admin UI ()
And update all descriptions
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI ()
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
Takeshi Umeda b0e3f0312c
Add synchronization of remote featured tags ()
* Add LIMIT of featured tag to instance API response

* Add featured_tags_collection_url to Account

* Add synchronization of remote featured tags

* Deliver update activity when updating featured tag

* Remove featured_tags_collection_url

* Revert "Add featured_tags_collection_url to Account"

This reverts commit cff349fc27.

* Add hashtag sync from featured collections

* Fix tag name normalize

* Add target option to fetch featured collection

* Refactor fetch_featured_tags_collection_service

* Add LIMIT of featured tag to v1/instance API response
Eugen Rochko aefa9253d6
Change featured hashtags to be displayed in navigation panel ()
Eugen Rochko 1bd00036c2
Change about page to be mounted in the web UI ()
Eugen Rochko b04633a961
Add image processing and generate blurhash for server thumbnail ()
Remove separate server hero setting
Yamagishi Kazutoshi 7afc6a630c
Redirect non-logged-in user to owner statuses on single user mode ()
Yamagishi Kazutoshi e82467ca41
Remove timeline preview link from nav panel when not signed-in ()
* Remove timeline preview link from nav panel when not signed-in

* Always enable server stats
Eugen Rochko a2ba011326
Change privacy policy to be rendered in web UI, add REST API ()
Source string no longer localized, Markdown instead of raw HTML
Eugen Rochko d2528b26b6
Add server banner to web app, add `GET /api/v2/instance` to REST API ()
Eugen Rochko e623c302d5
Add sign-up button to logged-out web UI ()
Eugen Rochko 43b5d5e38d
Add logged-out access to the web UI ()
Eugen Rochko 0d6b878808
Add user content translations with configurable backends ()
Claire 8cf7006d4e
Refactor ActivityPub handling to prepare for non-Account actors ()
* Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is
specifically required to be an Account

* Refactor SignatureVerification to allow non-Account actors

* fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

* Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors

* Refactor inbound ActivityPub payload processing to accept non-Account actors

* Refactor inbound ActivityPub processing to accept activities relayed through non-Account

* Refactor how Account key URIs are built

* Refactor Request and drop unused key_id_format parameter

* Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
Eugen Rochko 50948b46aa
Add ability to filter followed accounts' posts by language ()
trwnh 526b4b3677
Fix breaking change in admin account API ()
* Fix breaking change in admin account API

Ensure that `ip` is a String value and not returning a raw database entry

* please rubocop
Eugen Rochko 2a7766dcc9
Add admin API for managing e-mail domain blocks ()
Eugen Rochko c556c3a0d1
Add admin API for managing canonical e-mail blocks ()
Eugen Rochko b399d79545
Add admin API for managing IP blocks ()
Claire 50487db122
Add ability to filter individual posts ()
* Add database table for status-specific filters

* Add REST endpoints, entities and attributes

* Show status filters in /filters interface

* Perform server-side filtering for individual posts filters

* Fix filtering on context mismatch

* Refactor `toServerSideType` by moving it to its own module

* Move loupe and delete icons to their own module

* Add ability to filter individual posts from WebUI

* Replace keyword list by warnings (expired, context mismatch)

* Refactor server-side filtering code

* Add tests
Eugen Rochko c3f0621a59
Add ability to follow hashtags ()
Eugen Rochko e7aa2be828
Change how hashtags are normalized ()
* Change how hashtags are normalized

* Fix tests
Eugen Rochko 44b2ee3485
Add customizable user roles ()
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
Claire 02851848e9
Revamp post filtering system ()
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.
Eugen Rochko 2936f42a14
Add notifications for new reports ()
Claire 35588d09e2
Add /api/v1/admin/domain_allows ()
- `GET /api/v1/admin/domain_allows` lists allowed domains
- `GET /api/v1/admin/domain_allows/:id` shows one by ID
- `DELETE /api/v1/admin/domain_allows/:id` deletes a given domain from the list
  of allowed domains
- `POST /api/v1/admin/domain_allows` to allow a new domain:
  if that domain is already allowed, the existing DomainAllow will be returned
Eugen Rochko 45aa5781ce
Change brand color and logotypes ()
- Add rake task for generating Apple/Android icons and favicons from SVG
- Add rake task for generating PNG icons and logos for e-mails from SVG
- Remove obsolete Microsoft icons and configuration
- Remove PWA shortcut icons
Eugen Rochko a2871cd747
Add administrative webhooks ()
* Add administrative webhooks

* Fix error when webhook is deleted before delivery worker runs
Claire 28329ba62f
Add /api/v1/admin/domain_blocks ()
* Add /api/v1/admin/domain_blocks

Fixes 

- `GET /api/v1/admin/domain_blocks` lists domain blocks
- `GET /api/v1/admin/domain_blocks/:id` shows one by ID
- `DELETE /api/v1/admin/domain_blocks/:id` deletes a given domain block
- `POST /api/v1/admin/domain_blocks` to create a new domain block:
  if it conflicts with an existing one, returns an error with
  an attribute `existing_domain_block` with the rendered domain block

* Simplify conflict handling as suggested in review