Commit Graph

977 Commits (0f3719f16fb5a2704416fa3afae00ba767ad2b2c)

Author SHA1 Message Date
ThibG cb71c95e22 Export and import show_reblogs together with following list ()
* Refactor imports

* Export show_reblogs when exporting list of followed users

* Add support for importing show_reblogs with following collection

* Fix tests
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 d4882aa64a Export and import `hide_notifications` alongside user mutes ()
* Export hide_notifications along with user mutes

* Import hide_notifications along with muted users list

* Add headers for CSV exports
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
ThibG 2acd8940de Fix more keybase-related test failures ()
slice 85973f4f37 Improvements to image upload validation and creation ()
* Check if image value is nil? before creating an image

Check if uploaded images aren't nil before creating SiteUpload models
for them.

* Validate presence of file in SiteUpload

* Fix file presence validation

* Fabricate SiteUpload#file

* Add link to Creative Commons license
ThibG abecaba317 Fix failing keybase-related test ()
Eugen Rochko 1714ea5978
Add ActivityPub representation for identity proofs ()
* Add ActivityPub representation for identity proofs

* Add tests
Alex Gessner 69141dca26 squashed identity proof updates ()
Eugen Rochko f1bc90ab50
Rename :poll to :preloadable_poll and :owned_poll to :poll on Status ()
Also, fix some n+1 queries

Resolve 
Eugen Rochko 11fe293e1b
Remove unused ActivityPub `@context` values depending on response ()
Fix 
Eugen Rochko 555c4e11ba
Add validations to admin settings ()
* Add validations to admin settings

- Validate correct HTML markup
- Validate presence of contact username & e-mail
- Validate that all usernames are valid
- Validate that enums have expected values

* Fix code style issue

* Fix tests
ThibG 66d9452092 Do not try fetching keys of unknown accounts on a Delete from them ()
Eugen Rochko 9c4cbdbafb
Add Keybase integration ()
* create account_identity_proofs table

* add endpoint for keybase to check local proofs

* add async task to update validity and liveness of proofs from keybase

* first pass keybase proof CRUD

* second pass keybase proof creation

* clean up proof list and add badges

* add avatar url to keybase api

* Always highlight the “Identity Proofs” navigation item when interacting with proofs.

* Update translations.

* Add profile URL.

* Reorder proofs.

* Add proofs to bio.

* Update settings/identity_proofs front-end.

* Use `link_to`.

* Only encode query params if they exist.

URLs without params had a trailing `?`.

* Only show live proofs.

* change valid to active in proof list and update liveness before displaying

* minor fixes

* add keybase config at well-known path

* extremely naive feature flagging off the identity proof UI

* fixes for rubocop

* make identity proofs page resilient to potential keybase issues

* normalize i18n

* tweaks for brakeman

* remove two unused translations

* cleanup and add more localizations

* make keybase_contacts an admin setting

* fix ExternalProofService my_domain

* use Addressable::URI in identity proofs

* use active model serializer for keybase proof config

* more cleanup of keybase proof config

* rename proof is_valid and is_live to proof_valid and proof_live

* cleanup

* assorted tweaks for more robust communication with keybase

* Clean up

* Small fixes

* Display verified identity identically to verified links

* Clean up unused CSS

* Add caching for Keybase avatar URLs

* Remove keybase_contacts setting
ThibG a20354a20b Set and store report URIs ()
Fixes 
ThibG 5e38ef87a7 Fix reblogs privacy ()
* Fix reblogs privacy

* Fix Announce processing specs
Eugen Rochko 1c113fd72d
Add relationship manager UI ()
ysksn 782b622f5f Add specs for action log helper ()
* Add specs for ActionLogHelper

* Make some methods private

methods below never referenced from outside of their module:

- #linkable_log_target
- #log_target_from_history
Eugen Rochko 1b167707c2
Fix language detection of non-latin alphabets even at few characters ()
Eugen Rochko 51e154f5e8
Admission-based registrations mode ()
Fix 
Fix 
Eugen Rochko 65fffeac3f
Redesign landing page ()
Aurélien Reeves 85537b0069 Squish username before validation ()
* Squish username before validation ()

Fix 

* Move before_validation hook to a private method

Also add Unicode wite-spaces to the spec to support the use of squish
over strip.
ThibG c11dff5049 Reject existing Follows when suspending a remote account ()
* Reject existing Follows when suspending a remote account

Partial fix to 

* Add tests
ThibG 3aaac4f134 Do not allow adding votes to expired polls ()
* Do not allow adding votes to expired polls

* Only validate expires_at on create
Eugen Rochko 0a39c81dd8 Add test ensuring that unknown object types are rejected ()
ThibG 833ffce2df Store remote votes URI ()
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
Eugen Rochko 0e6998da3c
Add tests for ActivityPub poll processing ()
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
ThibG 9d3c6f1849 Improved remote thread fetching ()
* 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
Eugen Rochko e7f20cc43f
Add type, limit, offset, min_id, max_id, account_id to search API ()
* Add type, limit, offset, min_id, max_id, account_id to search API

Fix 

* 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
Eugen Rochko 1a1b8170bb
Fix Announce activities of unknown statuses not fetching those statuses ()
Regression from 
Eugen Rochko 147b4c2c3a
Add logging for rejected ActivityPub payloads and add tests ()
Eugen Rochko c417e8c198
Filter incoming Announce activities by relation to local activity ()
* Filter incoming Announce activities by relation to local activity

Reject if announcer is not followed by local accounts, and is not
from an enabled relay, and the object is not a local status

Follow-up to 

* Fix tests
ThibG 6a5307a573 Alternative handling of private self-boosts ()
* When self-boosting, embed original toot into Announce serialization

* Process unknown self-boosts from Announce object if it is more than an URI

* Add some self-boost specs

* Only serialize private toots in self-Announces
Franck Zoccolo 4f0322dcae Add support for IPv6 only MXes in Email validation ()
* Add support for IPv6 only MXes

* Fixed email validator tests
Eugen Rochko 016ad37bc8
Fix URL linkifier grabbing full-width spaces and quotations ()
Fix 
Fix 
Hinaloe 157d3af46c Only URLs extract with pre-escaped text ()
* [test] add japanese hashtag testcase

* Only URLs extract with pre-escaped text

( https://github.com/tootsuite/mastodon/issues/9989 )
Eugen Rochko 364f2ff9aa
Add featured hashtags to profiles ()
* 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
Eugen Rochko d14c276e58
Add option to overwrite imported data ()
* Add option to overwrite imported data

Fix 

* Add import for domain blocks
Jakub Mendyk 6a5e3da6b0 Allow most kinds of characters in URL query (fixes ) ()
* Allow unicode characters in URL query strings

Fixes 

* Alternative approach to unicode support in urls

Adds PoC/idea to approch this problem.
ThibG e2a5be6e9a Prevent posting toots with media attachments from someone else ()
ThibG 061feb63ed Fix scheduled toot with media immediately creating a toot ()
* Add test for not persisting status when attaching media to scheduled toot

* Prevent status used for validation from being persisted to the database

Fixes 

Thanks to tateisu for the help investigating this.
ThibG aeb124491d Reject existing Follow in addition to sending a Block ()
Mastodon expects remote servers to remove follow relationships upon receiving
a Block. However, the spec only evokes Block activities in a C2S context, never
in a S2S context.

This PR, in addition to federating the Block, explicitly sends a Reject for any
affected follow relationship, which makes a bit more sense with regards to the
spec.
Eugen Rochko bc642ac24b
Redesign public hashtag page to use a masonry layout ()
Moritz Heiber ecf40d09ed Disable Same-Site cookie implementation to fix SSO issues on WebKit browsers ()
Renato "Lond" Cerqueira 5c5e14c816 Fix undefined method error in sidekiq ()
* Fix undefined method error in sidekiq

Body can be not nil but still be empty, which causes a
`NoMethodError: undefined method `[]' for nil:NilClass` further in the
code. This checks for an empty body to avoid the issue.

* Fix codeclimate issue
ysksn c059999ab3 Add a spec for Admin::ActionLog ()
ysksn 09c3c96607 Add specs for Admin::AccountAction ()
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 1c6588accc
Redesign admin instances area ()