Commit Graph

468 Commits (02748f172dde400baeafebc47ccc958ccbfe441c)

Author SHA1 Message Date
Matt Jankowski 8d8ae05a18
Add spec coverage for `CLI::Media#lookup` command (#28266) 1 year ago
Matt Jankowski ad34d33bfd
Formalize some patterns in cli specs (#28255) 1 year ago
Claire 658ad7a6ca
Fix flaky tests related to file creation (#28248) 1 year ago
Matt Jankowski 0e8ba19113
Add spec coverage for `CLI::Emoji` class (#28182) 1 year ago
Matt Jankowski b3b009e6aa
Add spec coverage for `CLI::EmailDomainBlocks` commands (#28181) 1 year ago
Matt Jankowski 9603198982
Add spec coverage for `CLI::Domains#purge` command (#28179) 1 year ago
Matt Jankowski 1bf2230fd1
Add spec coverage for `CLI::Upgrade#storage_schema` command (#28180) 1 year ago
Matt Jankowski 1564799952
Add spec coverage for media CLI `refresh` command (#28166) 1 year ago
Matt Jankowski 7753e5f715
Add shared example for CLI command specs (#28165) 1 year ago
Matt Jankowski 92fa9b109f
Add spec coverage for media CLI usage command (#28167) 1 year ago
Claire 85662a5a57
Change `img-src` and `media-src` CSP directives to not include `https:` (#28025) 1 year ago
Matt Jankowski 973597c6f1
Consolidate configuration of `Sidekiq::Testing.fake!` setup (#28046) 1 year ago
Claire c260a68f54
Clean up some `Mastodon::CLI::Accounts` tests (#27473) 1 year ago
Matt Jankowski 1fabf20a88
Reduce `.times` usage in `lib/mastodon/cli/accounts` spec (#27944) 1 year ago
Matt Jankowski b2c5b20ef2
Fix `RSpec/AnyInstance` cop (#27810) 1 year ago
Matt Jankowski 4329616c53
Ignore block result of `send` method and remove `rubocop:disable` in deepl spec (#27741) 1 year ago
Matt Jankowski ee57bb4b44
Account statuses filter spec speedup (#27674) 1 year ago
Matt Jankowski 370802ce48
Add coverage for `CLI::Maintenance#fix_duplicates` command (#25252) 1 year ago
Matt Jankowski 49e2772064
Fix `RSpec/MessageSpies` cop (#27751) 1 year ago
Matt Jankowski cfa14ec6d1
Fix `Lint/EmptyBlock` cop (#27748) 1 year ago
Matt Jankowski d6f50839e1
Fix `RSpec/SpecFilePathFormat` cops (#27730) 1 year ago
Matt Jankowski fe26f33e0a
Fix `Rails/RedundantActiveRecordAllMethod` cop (#26885) 1 year ago
Matt Jankowski 949f5eb860
Fix `RSpec/MetadataStyle` cop in spec/ (#27729) 1 year ago
Claire c0989b78f8
Fix incoming status creation date not being restricted to standard ISO8601 (#27655) 1 year ago
Claire 0337df3a42
Fix posts from threads received out-of-order sometimes not being inserted into timelines (#27653) 1 year ago
Matt Jankowski eae5c7334a
Extract class from CSP configuration/initialization (#26905) 1 year ago
Matt Jankowski e93a75f1a1
Rails 7.1 update (#25963) 1 year ago
Claire 13688539bc
Fix processing LDSigned activities from actors with unknown public keys (#27474) 1 year ago
Daniel M Brasil 7bc8f03162
Add test coverage for `Mastodon::CLI::Accounts#migrate` (#25284) 1 year ago
Daniel M Brasil 091a21e1bc
Add test coverage for `Mastodon::CLI::Accounts#prune` (#25204) 1 year ago
Claire b34a2b1b33
Fix errors in CLI specs (#27399) 1 year ago
Matt Jankowski d54fec24e5
Add coverage for `CLI::PreviewCards#remove` command (#27441) 1 year ago
Matt Jankowski fc9ab61448
Expand spec coverage of `CLI::Media` (#27437) 1 year ago
Matt Jankowski f8afa0f614
Remove unused stub json ld context (#25454) 1 year ago
Matt Jankowski 00e92b4038
Add coverage for `CLI::Statuses` command (#25321) 1 year ago
Claire 299aa71c8f
Fix handling of `inLanguage` attribute in preview card processing (#27423) 1 year ago
KMY(雪あすか) 45bdd60f3c
Fix when unfollow a tag, my post also disappears from the home timeline (#27391) 1 year ago
Matt Jankowski 72cec47c13
Silence deprecation warning in CacheBuster spec (#27264) 1 year ago
Claire ceb365c419
Fix boosts of local users being filtered in account timelines (#27204) 1 year ago
Claire 94893cf24f
Merge pull request from GHSA-hcqf-fw2r-52g4
* Revert "Fix request URL normalisation for bare domain and 8-bit characters (#26285)"

This reverts commit 8891d8945d.

* Revert "Do not normalize URL before fetching it (#26219)"

This reverts commit fd284311e7.
1 year ago
Eugen Rochko 3a679844e4
Fix `account_id`, `max_id` and `min_id` params not working in search (#26847) 1 year ago
Eugen Rochko ece1ff77d6
Add `in:library` syntax to search (#26760)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Claire 16681e0f20
Add admin notifications for new Mastodon versions (#26582) 1 year ago
Eugen Rochko e754083e8a
Fix unmatched quotes and prefixes causing search to fail (#26701) 1 year ago
Claire e3825a13c1
Add PublicStatusesCheck to Elasticsearch index check on admin dashboard (#26650) 1 year ago
jsgoldstein 30c191aaa0
Add new public status index (#26344)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Nick Schonning b970ed6098
Update rubocop and rubocop-rspec (#26329) 1 year ago
Claire ac0eb0533e
Add Elasticsearch cluster health check and indexes mismatch check to dashboard (#26448) 1 year ago
Renaud Chaput b95867ad1f
Allow setting a custom HTTP method in CacheBuster (#26528)
Co-authored-by: Jorijn Schrijvershof <jorijn@jorijn.com>
1 year ago
Matt Jankowski d9a9323968
Avoid connecting to a running ES instance in ES search check spec (#26413) 1 year ago
Christian Schmidt 8da99ffb0d
Add alt text for preview card thumbnails (#26184) 2 years ago
Christian Schmidt 8891d8945d
Fix request URL normalisation for bare domain and 8-bit characters (#26285) 2 years ago
Christian Schmidt fd284311e7
Do not normalize URL before fetching it (#26219) 2 years ago
Claire 6c3c5bbbc3
Fix crash when processing Flag activity with no status (#26189) 2 years ago
Claire 5b457961fc
Fix linting issue (#26106) 2 years ago
Claire 144a406d33
Clean up unused application records (#24871) 2 years ago
Claire 1e3b19230a
Add stricter protocol fields validation for accounts (#25937) 2 years ago
Matt Jankowski 6c5a2233a8
Fix `RSpec/StubbedMock` cop (#25552)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 05f9e39b32
Fix `RSpec/VerifiedDoubles` cop (#25469) 2 years ago
Claire c78280a8ce
Add translate="no" to outgoing mentions and links (#25524) 2 years ago
Matt Jankowski e1c9d52e91
Reduce `sleep` time in request pool spec (#25470) 2 years ago
Matt Jankowski 4c5aa0e470
Update rubocop-rspec to version 2.22.0, fix `RSpec/IndexedLet` cop (#24698) 2 years ago
Matt Jankowski b5675e265e
Add coverage for `CLI::Feeds` command (#25319) 2 years ago
Matt Jankowski 07933db788
Add coverage for `CLI::Cache` command (#25238) 2 years ago
Matt Jankowski 6c0e3f490a
Fix RSpec/MissingExampleGroupArgument cop (#25310) 2 years ago
Matt Jankowski b74c3cd708
Fix `RSpec/DescribedClass` cop missed items (#25309) 2 years ago
Matt Jankowski c42591356d
Fix `RSpec/DescribedClass` cop (#25104) 2 years ago
Daniel M Brasil eb6f8181e1
Add test coverage for `Mastodon::CLI::Accounts#reset_relationships` (#25194) 2 years ago
Eugen Rochko 4eda233e09
Add webhook templating (#23289)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski af135bddd0
Update `Admin::Metrics::Measure` classes for Rails 7 (#25236) 2 years ago
Matt Jankowski 3b21c13dcc
Rails 7 compatibility fix for `Admin::Metrics::Dimension` classes (#25277) 2 years ago
Daniel M Brasil 70cd2d6000
Add test coverage for `Mastodon::CLI::Accounts#cull` (#25250) 2 years ago
Darius Kazemi bacb674921
Add exclusive lists (#22048)
Co-authored-by: Liam Cooke <liam@liamcooke.com>
Co-authored-by: John Holdun <john@johnholdun.com>
Co-authored-by: Effy Elden <effy@effy.space>
Co-authored-by: Lina Reyne <git@lina.pizza>
Co-authored-by: Lina <20880695+necropolina@users.noreply.github.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 5c87c66504
Add coverage for CLI::CanonicalEmailBlocks command (#25239) 2 years ago
Daniel M Brasil 03a707f6a6
Add test coverage for `Mastodon::CLI::Accounts#merge` (#25199) 2 years ago
Daniel M Brasil 2a353200ad
Add test coverage for `Mastodon::CLI::Accounts#rotate` (#25212) 2 years ago
Daniel M Brasil f906e21a4f
Add test coverage for `Mastodon::CLI::Accounts#refresh` (#25196) 2 years ago
Matt Jankowski f84037ae2b
Remove unused #hash_to_object method in SettingsHelper (#25213) 2 years ago
Claire e9385e93e9
Add a confirmation screen when suspending a domain (#25144) 2 years ago
Christian Schmidt 69057467cb
Translate CW, poll options and media descriptions (#24175)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Daniel M Brasil 3c41547f49
Add test coverage for `Mastodon::CLI::Accounts#backup` (#25163) 2 years ago
Daniel M Brasil bf9a7ce8e8
Add test coverage for `Mastodon::CLI::Accounts#unfollow` (#25162) 2 years ago
Daniel M Brasil dbc44be0ca
Add test coverage for `Mastodon::CLI::Accounts#follow` (#25161) 2 years ago
Daniel M Brasil 3d253b9830
Add test coverage for `Mastodon::CLI::Accounts#approve` (#25160) 2 years ago
Daniel M Brasil bbbcdc083f
Add test coverage for `Mastodon::CLI::Accounts#delete` (#25146) 2 years ago
Daniel M Brasil bdc7548652
Add test coverage for `Mastodon::CLI::Accounts#modify` (#25145) 2 years ago
Daniel M Brasil 11b8336418
Add test coverage for `Mastodon::CLI::Accounts#create` (#25143) 2 years ago
Matt Jankowski 384345b0de
Add CLI Base class for command line code (#25106) 2 years ago
Matt Jankowski 778e4a7bf7
Fix RSpec/ExpectInHook cop (#25100) 2 years ago
Matt Jankowski b6b4ea4ca5
Move the mastodon/*_cli files to mastodon/cli/* (#24139) 2 years ago
Emelia Smith 19f9098551
Allow reports with long comments from remote instances, but truncate (#25028) 2 years ago
Matt Jankowski d34d94d08f
Add spec for migration warning module (#25033) 2 years ago
Claire 9015c2d646
Change profile updates to be sent to recently-mentioned servers (#24852) 2 years ago
Daniel M Brasil 9cbda99941
Add test coverage for `Mastodon::IpBlocksCLI` (#24935) 2 years ago
Claire 6b0942d107
Change AccessTokensVacuum to also delete expired tokens (#24868) 2 years ago
Daniel M Brasil c9210af3ee
Add test coverage for `Mastodon::SettingsCLI` (#24856) 2 years ago
Matt Jankowski 710745e16b
Fix RSpec/ContextWording cop (#24739) 2 years ago
Matt Jankowski 3df665fd23
Fix Lint/ConstantDefinitionInBlock cop (#24763) 2 years ago
Matt Jankowski 570079f8ce
Fix Performance/TimesMap cop (#24789) 2 years ago
Claire 32a030dd74
Rewrite import feature (#21054) 2 years ago
Matt Jankowski 9d39b111f1
Expand coverage for "system checks" (#24216) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski b179ff84c7
Add specs for Chewy importers (#24204) 2 years ago
Christian Schmidt bd047acc35
Replace `Status#translatable?` with language matrix in separate endpoint (#24037) 2 years ago
Matt Jankowski a471e1c48f
Add spec for the CLI `version` task (#23978) 2 years ago
Matt Jankowski 688287c59d
Coverage improvement round-out following up previous work (#23987) 2 years ago
Christian Schmidt 684a970b3c
Unescape HTML entities (#24019) 2 years ago
Christian Schmidt 5a8c651e8f
Only offer translation for supported languages (#23879) 2 years ago
Claire 3a6451c867
Add support for incoming rich text (#23913) 2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning 2c3c734bcc
Autofix Rubocop Style/SymbolProc (#23742) 2 years ago
Nick Schonning 5116347eb7
Autofix Rubocop RSpec/BeEq (#23740) 2 years ago
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 2 years ago
Nick Schonning 38a1d8bb85
Autofix Rubocop RSpec/ImplicitSubject (#23721) 2 years ago
Nick Schonning 5179c47087
Autofix Rubocops RSpec/ScatteredLet (#23725) 2 years ago
Nick Schonning bd1d57c230
Autofix Rubocop RSpec/EmptyLineAfterSubject (#23719) 2 years ago
Nick Schonning dbc6d7b276
Autofix Rubocop Lint/UnusedBlockArgument (#23712) 2 years ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 3680e032b4
Autofix Rubocop RSpec/EmptyLineAfterFinalLet (#23707) 2 years ago
Nick Schonning 167709f6b0
Autofix Rubocop Style/BlockDelimiters (#23706) 2 years ago
Nick Schonning 08289a38fa
Autofix Rubocop Style/TrailingCommaInArrayLiteral (#23692) 2 years ago
Nick Schonning 5069769cbe
Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 2 years ago
Nick Schonning a7db0b41cd
Autofix Rubocop Lint/ParenthesesAsGroupedExpression (#23682) 2 years ago
Nick Schonning efd424506a
Autofix Rubocop Style/RedundantPercentQ (#23651) 2 years ago
Nick Schonning 54318dcd6d
Autofix Rubocop RSpec/ClassCheck (#23685) 2 years ago
Nick Schonning 634368c491
Autofix Rubocop Lint/SymbolConversion (#23683) 2 years ago
Nick Schonning 6d42820e5d
Autofix Rubocop Lint/AmbiguousOperator (#23680) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Claire 0c9eac80d8
Fix unbounded recursion in post discovery (#23506)
* Add a limit to how many posts can get fetched as a result of a single request

* Add tests

* Always pass `request_id` when processing `Announce` activities

---------

Co-authored-by: nametoolong <nametoolong@users.noreply.github.com>
2 years ago
Claire 15b88a83ab
Fix sanitizer parsing link text as HTML when stripping unsupported links (#22558) 2 years ago
Markus Unterwaditzer 0c689b9d01
fix: allow verification when page size exceeds 1MB (using HTML5 parser) (#22879)
* fix: allow verification when page size exceeds 1MB
Truncates the page after 1MB instead

Closes #15316

* switch to HTML5 parser, fix rubocop errors

* undo rubocop fixes

Co-authored-by: Chris Zubak-Skees <chriszs@gmail.com>
2 years ago
Jeong Arm fdd1facba1
Fix home TL could contain post from who blocked me (#22849)
* Fix home tl contains post from who blocked me

* Add test

* Fix feed_manager's build_crutches

blocked_by was not includes status' owner

* Add test for status from I blocked

* Fix typo
2 years ago
luzpaz 6ba52306f9
Fix typos (#19849)
Found via `codespell -q 3 -S ./yarn.lock,./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,followings,keypair,medias,pattens,pixelx,rememberable,ro,te`
2 years ago
Claire 3114c826a7
Fix filter handling in status cache hydration (#19963) 2 years ago
Claire bb89f83cc0
Fix additional issues with status cache hydration (#19747)
* Spare one SQL query when hydrating polls

* Improve tests

* Fix more discrepancies

* Fix possible crash when the status has no application set
2 years ago
Claire 03b991de6c
Fix various issues with store hydration (#19746)
- Improve tests
- Fix possible crash when application of a reblogged post isn't set
- Fix discrepancies around favourited and reblogged attributes
- Fix discrepancies around pinned attribute
- Fix polls not being hydrated
2 years ago
Eugen Rochko 5f9e47be34
Add caching for payload serialization during fan-out (#19642) 2 years ago
Eugen Rochko bf0ab3e0fa
Fix vacuum scheduler missing lock, locks never expiring (#19458)
Remove vacuuming of orphaned preview cards
2 years ago
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI (#19319)
* 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
2 years ago
Eugen Rochko 43b5d5e38d
Add logged-out access to the web UI (#18961) 2 years ago
Eugen Rochko 5c9abdeff1
Add retention policy for cached content and media (#19232) 2 years ago
Claire 8cf7006d4e
Refactor ActivityPub handling to prepare for non-Account actors (#19212)
* 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`
2 years ago
Eugen Rochko 50948b46aa
Add ability to filter followed accounts' posts by language (#19095) 2 years ago
luzpaz 4aa3b9bd01
Fix typos (#18604)
* Fix typos

Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,pixelx,ro`

* Follow-up typo fix
2 years ago
Eugen Rochko e7aa2be828
Change how hashtags are normalized (#18795)
* Change how hashtags are normalized

* Fix tests
3 years ago
Claire 1b4054256f
Fix crash when a remote Flag activity mentions a private post (#18760)
* Add tests

* Fix crash when a remote Flag activity mentions a private post
3 years ago
Claire 02851848e9
Revamp post filtering system (#18058)
* 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.
3 years ago
Eugen Rochko 2b8dc58b7f
Change RSS feeds (#18356)
* Change RSS feeds

- Use date and time for titles instead of ellipsized text
- Use full content in body, even when there is a content warning
- Use media extensions

* Change feed icons and add width and height attributes to custom emojis

* Fix custom emoji animate on hover breaking

* Fix tests
3 years ago
Eugen Rochko 3917353645
Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
3 years ago