Commit Graph

464 Commits (82e1c6216e28f02e71270543ff44a26eeff771b5)

Author SHA1 Message Date
Eugen Rochko e6ffbfb5e7
Add `types` param to `GET /api/v1/notifications` in REST API ()
* Add `types` param to `GET /api/v1/notifications` in REST API

* Improve tests
Eugen Rochko bc320d6cec
Fix `POST /api/v1/emails/confirmations` not being available after sign-up ()
Eugen Rochko b2cd34474b
Add rate limit for editing ()
Eugen Rochko 8f6c67bfde
Fix performance of account timelines ()
* Fix performance of account timelines

* Various fixes and improvements

* Fix duplicate results being returned

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Fix grouping for pinned statuses scope

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko edf09ec747
Add `/api/v1/accounts/familiar_followers` to REST API ()
* Add `/api/v1/accounts/familiar_followers` to REST API

* Change hide network preference to be stored consistently for local and remote accounts

* Add dummy classes to migration

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko 2ea754b861
Fix duplicate notifications being possible after poll expiration ()
Claire ff43e54a49
Allow editing media attachments for scheduled toots ()
Fixes 
Eugen Rochko 631e495a79
Change `follow` scope to be covered by `read` and `write` scopes in REST API ()
Deprecate `follow` scope
Eugen Rochko e24b14cc74
Fix leak of existence of otherwise inaccessible statuses in REST API ()
Eugen Rochko 02b8d63fce
Fix report category not being saved in REST API ()
Eugen Rochko 50ea54b3ed
Change authorized applications page ()
* Change authorized applications page

* Hide revoke button for superapps and suspended accounts

* Clean up db/schema.rb
Eugen Rochko 27965ce5ed
Add trending statuses ()
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
Eugen Rochko 7b816eb5ae
Add notifications for new sign-ups ()
Eugen Rochko 8f03b7a2fb
Add notifications when a reblogged status has been updated ()
* Add notifications when a reblogged status has been updated

* Change wording to say "edit" instead of "update" and add missing controls

* Replace previous update notifications with the most up-to-date one
Eugen Rochko 63002cde03
Add editing for published statuses ()
* Add editing for published statuses

* Fix change of multiple-choice boolean in poll not resetting votes

* Remove the ability to update existing media attachments for now
Eugen Rochko 2f8159baad
Add `category` and `rule_ids` params to `POST /api/v1/reports` ()
Eugen Rochko fd3a45e348
Add edit history to web UI ()
* Add edit history to web UI

* Change history reducer to store items per status

* Fix missing loading prop
Claire 03d59340da
Fix Sidekiq warnings about JSON serialization ()
* Fix Sidekiq warnings about JSON serialization

This occurs on every symbol argument we pass, and every symbol key in hashes,
because Sidekiq expects strings instead.

See https://github.com/mperham/sidekiq/pull/5071

We do not need to change how workers parse their arguments because this has
not changed and we were already converting to symbols adequately or using
`with_indifferent_access`.

* Set Sidekiq to raise on unsafe arguments in test mode

In order to more easily catch issues that would produce warnings in production
code.
Claire bddd9ba36d
Add OMNIAUTH_ONLY environment variable to enforce externa log-in ()
* Remove support for OAUTH_REDIRECT_AT_SIGN_IN

Fixes 

Introduced in , OAUTH_REDIRECT_AT_SIGN_IN allowed skipping the log-in form
to instead redirect to the external OmniAuth login provider.

However, it did not prevent the log-in form on /about introduced by  from
appearing, and completely broke with the introduction of .

As I restoring that previous log-in flow without introducing a security
vulnerability may require extensive care and knowledge of how OmniAuth works,
this commit removes support for OAUTH_REDIRECT_AT_SIGN_IN instead for the time
being.

* Add OMNIAUTH_ONLY environment variable to enforce external log-in only

* Disable user registration when OMNIAUTH_ONLY is set to true

* Replace log-in links When OMNIAUTH_ONLY is set with exactly one OmniAuth provider
Eugen Rochko 1060666c58
Add support for editing for published statuses ()
* Add support for editing for published statuses

* Fix references to stripped-out code

* Various fixes and improvements

* Further fixes and improvements

* Fix updates being potentially sent to unauthorized recipients

* Various fixes and improvements

* Fix wrong words in test

* Fix notifying accounts that were tagged but were not in the audience

* Fix mistake
Eugen Rochko 14f436c457
Add notifications for statuses deleted by moderators ()
Claire d5c9feb7b7
Add support for private pinned posts ()
* Add support for private pinned toots

* Allow local user to pin private toots

* Change wording to avoid "direct message"
Eugen Rochko 8e84ebf0cb
Remove IP tracking columns from users table ()
Eugen Rochko 7de0ee7aba
Remove Keybase integration ()
Eugen Rochko 6e50134a42
Add trending links ()
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
Takeshi Umeda 17f4e457b3
Add remove from followers api ()
* Add followed_by? to account_interactions

* Add RemoveFromFollowersService

* Fix AccountBatch to use RemoveFromFollowersService

* Add remove from followers API
Eugen Rochko 07341e7aa6
Add graphs and retention metrics to admin dashboard ()
Claire d8629e7b86
Add logging of S3-related errors ()
Eugen Rochko 1410dffdf4
Fix e-mail confirmations API not working correctly ()
* Fix e-mail confirmations API not working correctly

* Fix typo
Claire 566fc90913
Add Ruby 3.0 support ()
* Fix issues with POSIX::Spawn, Terrapin and Ruby 3.0

Also improve the Terrapin monkey-patch for the stderr/stdout issue.

* Fix keyword argument handling throughout the codebase

* Monkey-patch Paperclip to fix keyword arguments handling in validators

* Change validation_extensions to please CodeClimate

* Bump microformats from 4.2.1 to 4.3.1

* Allow Ruby 3.0

* Add Ruby 3.0 test target to CircleCI

* Add test for admin dashboard warnings

* Fix admin dashboard warnings on Ruby 3.0
abcang d0fc69d721
Further improve the media attached status query for accounts ()
abcang 1f47511023
Improve media attached status query ()
Eugen Rochko daccc07dc1
Change auto-following admin-selected accounts, show in recommendations ()
Eugen Rochko ce2148c571
Add `policy` param to `POST /api/v1/push/subscriptions` ()
With possible values `all`, `followed`, `follower`, and `none`,
control from whom notifications will generate a Web Push alert
Eugen Rochko f7117646af
Add cold-start follow recommendations ()
Eugen Rochko dd1eb9918a
Add `email` param to `POST /api/v1/emails/confirmations` ()
Allow changing e-mail as long as the account is unconfirmed
Eugen Rochko ee1119208c
Add `POST /api/v1/emails/confirmations` to REST API ()
Only available to the application the user originally signed-up with
Eugen Rochko 9aa37b32c3
Add `details` to error response for `POST /api/v1/accounts` in REST API ()
Eugen Rochko 8331fdf7e0
Add server rules ()
Eugen Rochko e31ed27485
Add `GET /api/v1/accounts/lookup` REST API ()
Eugen Rochko 15ced8728f
Refactor Api::Web::SettingsController ()
abcang 7ab53f221a
Improved performance of notification preloading ()
* Improved performance of notification preloading

* Remove Cacheable from Notification

* Fix test
ThibG 54d4e5252b
Use Rails' index_by where it makes sense ()
* Use Rails' index_by where it makes sense

* Fix tests

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Levi Bard 11d603101a
Fix muting users with duration via the REST api ()
luigi 087ed84367
Optimize map { ... }.compact calls ()
* Optimize map { ... }.compact

using Enumerable#filter_map, supported since Ruby 2.7

* Add poyfill for Enumerable#filter_map
trwnh 4950e59cdc
Use existing FeaturedTag serializer and delete AccountFeaturedTag serializer ()
* Update featured_tags_controller.rb

* Update featured_tag_serializer.rb

* Update featured_tag_serializer.rb

* Delete account_featured_tag_serializer.rb

* please codeclimate

* please codeclimate
Eugen Rochko 1045549f85
Add stoplight for object storage failures, return HTTP 503 ()
Eugen Rochko 216b85b053
Fix performance on instances list in admin UI ()
- Reduce duplicate queries
- Remove n+1 queries
- Add accounts count to detailed view
- Add separate action log entry for updating existing domain blocks
Takeshi Umeda 44d5c6bc8f
Fix incorrect conditions for suspended accounts in Get API for account featured tags ()
ThibG c43f4cd3bb
Fix not being able to unfavorite toots one has lost access to ()
Fixes