Commit Graph

123 Commits (9eb775a9d1fd39bc2d255679bb12b2ff6f98080d)

Author SHA1 Message Date
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
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 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
Claire 87085a5152
Fix AccountNote not having a maximum length ()
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 3b8d085436
Fix app name, website and redirect URIs not having a maximum length ()
Fix app scopes not being validated
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
Claire cbd0ee1d07
Update Mastodon to Rails 6.1 ()
* Update devise-two-factor to unreleased fork for Rails 6 support

Update tests to match new `rotp` version.

* Update nsa gem to unreleased fork for Rails 6 support

* Update rails to 6.1.3 and rails-i18n to 6.0

* Update to unreleased fork of pluck_each for Ruby 6 support

* Run "rails app:update"

* Add missing ActiveStorage config file

* Use config.ssl_options instead of removed ApplicationController#force_ssl

Disabled force_ssl-related tests as they do not seem to be easily testable
anymore.

* Fix nonce directives by removing Rails 5 specific monkey-patching

* Fix fixture_file_upload deprecation warning

* Fix yield-based test failing with Rails 6

* Use Rails 6's index_with when possible

* Use ActiveRecord::Cache::Store#delete_multi from Rails 6

This will yield better performances when deleting an account

* Disable Rails 6.1's automatic preload link headers

Since Rails 6.1, ActionView adds preload links for javascript files
in the Links header per default.

In our case, that will bloat headers too much and potentially cause
issues with reverse proxies. Furhermore, we don't need those links,
as we already output them as HTML link tags.

* Switch to Rails 6.0 default config

* Switch to Rails 6.1 default config

* Do not include autoload paths in the load path
Claire 5f4c0b79c2
Change ResolveAccountService's handling of skip_webfinger ()
* Change ResolveAccountService's handling of skip_webfinger

Change it so it never makes any webfinger query, as the name would imply.

* Add tests

* Change FollowService to not take an URI for target_account

* Restore domain-block check in FollowService

* Fix tests
Levi Bard 11d603101a
Fix muting users with duration via the REST api ()
ThibG c43f4cd3bb
Fix not being able to unfavorite toots one has lost access to ()
Fixes 
Eugen Rochko 3134691948
Add support for reversible suspensions through ActivityPub ()
Takeshi Umeda d6fe0c94ca
Add account sensitized ()
* Add account sensitized

* Fix i18n normalize

* Fix description and spec

* Fix spec

* Fix wording
Eugen Rochko 974b1b79ce
Add option to be notified when a followed user posts ()
* Add bell button

Fix 

* 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
ThibG f6a82cb2cd
Fix not being able to unbookmark toots when blocked by their author ()
* Fix not being able to unbookmark toots when blocked by their author

* Add tests
ThibG 0a8a3fe595
Fix being unable to unboost when blocked by their author ()
Fixes 
dependabot-preview[bot] 78202e9138
Bump doorkeeper from 5.3.3 to 5.4.0 ()
* Bump doorkeeper from 5.3.3 to 5.4.0

Bumps [doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) from 5.3.3 to 5.4.0.
- [Release notes](https://github.com/doorkeeper-gem/doorkeeper/releases)
- [Changelog](https://github.com/doorkeeper-gem/doorkeeper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/doorkeeper-gem/doorkeeper/compare/v5.3.3...v5.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix tests

* Fix use of Doorkeeper::AccessToken.find_or_create_for

* Fix tests?

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Thibaut Girka <thib@sitedethib.com>
ThibG f1e0fa80f6
Fix own following/followers not showing muted users ()
Fixes 
Eugen Rochko 339ce1c4e9
Add specific rate limits for posting and following ()
Eugen Rochko 0c28a505dd
Fix leak of arbitrary statuses through unfavourite action in REST API ()
Eugen Rochko f52c988e12
Add announcements ()
* Add announcements

Fix 

* Add reactions to announcements

* Add admin UI for announcements

* Add unit tests

* Fix issues

- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"

* Fix scheduler unpublishing announcements before they are due

* Fix filter params not being passed to announcements filter
ThibG 3b3bdc7293 Hide blocked users from more places ()
* Hide blocked, muted, and blocked-by users from toot favourite lists

* Hide blocked, muted, and blocked-by users from toot reblog lists

* Hide blocked, muted, and blocked-by users from followers/following (API)

* Fix tests

* Hide blocked, muted, and blocked-by users from followers/following on public pages
Gomasy 5a2c0707f1 Support min_id-based pagination for bookmarks ()
* Support min_id-based pagination for bookmarks

* Fix spec
Jennifer Glauche fd93a9c871 make it not return http 400 when passing and empty source argument ()
* make it not return http 400 when passing and empty source argument

* create a spec for the empty source hash bug

* compact checks for nil, empty? parameters

* use nil.blank? instead checking for nil
ThibG dfea7368c9 Add bookmarks ()
* Add backend support for bookmarks

Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.

* Add spec for bookmark endpoints

* Add front-end support for bookmarks

* Introduce OAuth scopes for bookmarks

* Add bookmarks to archive takeout

* Fix migration

* Coding style fixes

* Fix rebase issue

* Update bookmarked_statuses to latest UI changes

* Update bookmark actions to properly reflect status changes in state

* Add bookmarks item to single-column layout

* Make active bookmarks red
Eugen Rochko 18331fefa2
Remove deprecated `GET /api/v1/search` API ()
Use `GET /api/v2/search` instead
ThibG 4faaa5b25e Add updated relationship to follow request API responses ()
Fixes 
Eugen Rochko e445a8af64
Add timeline read markers API ()
Fix 
Eugen Rochko 23aeef52cc
Remove Salmon and PubSubHubbub ()
* Remove Salmon and PubSubHubbub endpoints

* Add error when trying to follow OStatus accounts

* Fix new accounts not being created in ResolveAccountService
Eugen Rochko 0c1b1069c9
Remove deprecated REST API `GET /api/v1/statuses/:id/card` ()
Eugen Rochko 3fd6ab99e6
Remove deprecated REST API `GET /api/v1/timelines/direct` ()
Eugen Rochko 7696f77245
Add moderation API ()
Fix 
Fix 
Eugen Rochko 48fee1a800
Fix poll API not requiring authentication on non-public polls ()
* Fix poll API not requiring authentication on non-public polls

That API does not reveal the content of the status, i.e. the question
itself, nor who the author is, nor which status it belongs to, but it
does reveal the poll options and how many answers they got

Fix 

* Add test
Paul Woolcock 0c933c1b8c Add `account_id` param to `GET /api/v1/notifications` ()
* Add `from_account` to notifications API

this adds the ability to filter notifications by the account they
originated from

* passing a non-existent user should cause none to be returned

* Fix codeclimate warnings

* fix more codeclimate warnings

* make requested changes:

* use account id instead of user@domain
* name the param `account_id` instead of `from_account`

* Don't use `return` in a lambda
trwnh a6caf919e2 Change bio limit from 160 to 500 ()
* Change note_length validator from 160 to 500

* Change input maxlength from 160 to 500

* update bio test from 160 to 500

* Multiply a string 30 times instead of 10
Eugen Rochko 67b3b62b98
Improve blocked view of profiles ()
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following ()"

This reverts commit 120544067f.

* Revert "Hide blocking accounts from blocked users ()"

This reverts commit 62bafa20a1.

* Improve blocked view of profiles

- Change "You are blocked" to "Profile unavailable"
- Hide following/followers in API when blocked
- Disable follow button and show "Profile unavailable" on public profile as well
ThibG 62bafa20a1 Hide blocking accounts from blocked users ()
* Revert "Add indication that you have been blocked in web UI ()"

This reverts commit bd02ec6daa.

* Revert "Add `blocked_by` relationship to the REST API ()"

This reverts commit 9745de883b.

* Hide blocking accounts from search results

* Filter blocking accouts from account followers

* Filter blocking accouts from account's following accounts

* Filter blocking accounts from “reblogged by” and “favourited by” lists

* Remove blocking account from URL search

* Return 410 on trying to fetch user data from a user who blocked us

* Return 410 in /api/v1/account/statuses for suspended or blocking accounts

* Fix status filtering when performing URL search

* Restore some React improvements

Restore some cleanup from bd02ec6daa

* Refactor by adding `without_blocking` scope
Eugen Rochko 230a012f00
Add polls ()
* Add polls

Fix 

* 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
ysksn 61ecda1575 Not to skip executable specs ()
* Not to skip executable specs

* Combine specs

Combine specs to one to reduce multiple slow http post.
Eugen Rochko a49d43d112
Add scheduled statuses ()
Fix 
Eugen Rochko 5d2fc6de32
Add REST API for creating an account ()
* 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
ysksn 0c80715235 Add spec for Api::V1::Timelines::DirectController ()
ysksn 351938520d Add specs for Api::V1::Instances::PeersController ()
ysksn 2d871feb10 Add spec for Api::V1::EndorsementsController ()
ysksn 3fa9615cb3 Add spec for Api::V1::Instances::ActivityController ()
ysksn a3dcbfddd6 Add specs for Accounts::PinsController ()
Eugen Rochko 774ac47373
Add conversations API ()
* Add conversations API

* Add web UI for conversations

* Add test for conversations API

* Add tests for ConversationAccount

* Improve web UI

* Rename ConversationAccount to AccountConversation

* Remove conversations on block and mute

* Change last_status_id to be a denormalization of status_ids

* Add optimistic locking
aus-social 1f98eae1cf Lint pass ()
Eugen Rochko f0fff3eb10
Support min_id-based pagination in REST API ()
* Allow min_id pagination in Feed#get

* Add min_id pagination to home and list timeline APIs

* Add min_id pagination to account statuses, public and tag APIs

* Remove unused stub in reports API

* Use min_id pagination in notifications, favourites, and fix order

* Fix HomeFeed#from_database not using paginate_by_id
Jakub Mendyk f3a12ddfd0 Make Api::V1::MutesController paginate properly ()
Fixes