Commit Graph
51 Commits
Author SHA1 Message Date
Claire 39d9da3b82 Tag linked FeaturedCollection objects over ActivityPub (#38115) 2026-03-23 13:11:33 +00:00
Claire 21576e29ab Refactor ProcessMentionsService to remove save_records parameter (#38277) 2026-03-23 09:12:30 +00:00
David Roetzel 5e8b8f9c23 Extract interaction policy class (#37277) 2025-12-17 10:12:43 +00:00
Claire 28be5a199f Fix Private Messages self-quoting private posts being changed to followers-only (#36249) 2025-09-24 10:58:52 +00:00
Claire 82b26603fe Fix quote posts with CW and no text being rejected (#36095) 2025-09-12 13:10:31 +00:00
Claire 75fca715e9 Change public self-quotes of private posts to be disallowed (#35975) 2025-09-02 15:48:37 +00:00
Claire 9ec99ffef1 Add quote_approval_policy parameter when posting and editing statuses (#35699) 2025-08-06 14:23:12 +00:00
Claire 5a88b7f683 Add experimental basic quote post authoring (#35355) 2025-07-25 12:35:24 +00:00
Matt Jankowski 6fddf1610c Fix awkwardly-worded nature of scheduled too soon error (#33156) 2024-12-04 07:43:29 +00:00
Christian Schmidt 8cdc148167 Handle invalid visibility (#31571) 2024-09-12 13:29:55 +00:00
Christian Schmidt a5bbe83dfd media_ids is an array of strings (#31709) 2024-09-02 20:18:09 +00:00
Christian Schmidt 491033c86c Reject status creation with invalid media_ids parameter (#31681) 2024-09-02 15:30:48 +00:00
Daniel M Brasil 77c2216e47 fix: Return HTTP 422 when scheduled status time is less than 5 minutes (#30584) 2024-06-10 13:33:48 +00:00
Matt Jankowski c61e356475 Add Status::MEDIA_ATTACHMENTS_LIMIT configuration constant (#30433) 2024-05-27 09:49:44 +00:00
Claire 91ca90e25b Fix Idempotency-Key ignored when scheduling a post (#30084) 2024-04-26 13:19:02 +00:00
Matt Jankowski 6262ceeb70 Fix RSpec/DescribedClass cop (#29472) 2024-03-13 15:42:39 +00:00
Matt Jankowski 469028b6d3 Remove unneeded type: :service from spec/services files (#29304) 2024-03-13 08:39:26 +00:00
Matt Jankowski 4b7f04e3ea Reduce RSpec/MultipleExpectations in post_status_service spec (#29225) 2024-02-16 07:52:29 +00:00
Matt Jankowski 0df86d77fd Reduce RSpec/ExampleLength in PostStatusService spec example (#29105) 2024-02-06 14:36:04 +00:00
Matt Jankowski bcd0171e5e Fix Lint/UselessAssignment cop (#27472) 2023-10-19 16:55:06 +02:00
Matt Jankowski 658742b3cd Fix Lint/AmbiguousBlockAssociation cop (#25921) 2023-07-12 10:02:41 +02:00
Matt Jankowski 05f9e39b32 Fix RSpec/VerifiedDoubles cop (#25469) 2023-06-22 14:55:22 +02:00
Matt Jankowski c42591356d Fix RSpec/DescribedClass cop (#25104) 2023-06-06 13:58:33 +02:00
Matt Jankowski b896b16cb3 Fix RSpec/PredicateMatcher cop (#25102) 2023-05-23 16:49:11 +02:00
Nick Schonning 84cc805cae Enable Style/FrozenStringLiteralComment for specs (#23790) 2023-02-22 09:55:31 +09:00
Nick Schonning 5116347eb7 Autofix Rubocop RSpec/BeEq (#23740) 2023-02-20 06:14:50 +01:00
Nick Schonning 65ba0d92ef Enable Rubocop RSpec/NotToNot (#23723) 2023-02-20 02:33:27 +01:00
Nick Schonning 81ad6c2e39 Autofix Rubocop Style/StringLiterals (#23695) 2023-02-19 07:38:14 +09:00
Nick Schonning c38bd17657 Autofix Rubocop Style/TrailingCommaInArguments (#23694) 2023-02-18 12:39:58 +01:00
Nick Schonning 936204b9ea Autofix Rubocop Style/NestedParenthesizedCalls (#23646) 2023-02-17 21:43:10 +09:00
Claire d6930b3847 Add API parameter to safeguard unexpect mentions in new posts (#18350) 2023-02-13 16:36:29 +01:00
Claire 216570ad98 Fix scheduled statuses decreasing statuses counts (#16791)
* Add tests

* Fix scheduled statuses decreasing statuses counts

Fixes #16774
2021-10-14 19:59:21 +02:00
ThibG f08f880f58 Fix media not being marked sensitive when client sets a CW but no text (#13277)
Mastodon enforces the “sensitive” flag on media attachments whenever a toot
is posted with a Content Warning. However, it does so *after* potentially
converting the Content Warning to toot text (when there is no toot text),
which leads to inconsistent and surprising behavior for API clients.
This commit fixes this inconsistency.
2020-03-25 22:40:58 +01:00
Eugen Rochko 81cc86bb1f Fix media attachments without file being uploadable (#12562)
Fix #12554
2020-01-23 21:40:03 +01:00
Eugen Rochko 23aeef52cc Remove Salmon and PubSubHubbub (#11205)
* Remove Salmon and PubSubHubbub endpoints

* Add error when trying to follow OStatus accounts

* Fix new accounts not being created in ResolveAccountService
2019-07-06 23:26:16 +02:00
ThibG e2a5be6e9a Prevent posting toots with media attachments from someone else (#9921) 2019-01-26 23:59:39 +01:00
ThibG 061feb63ed Fix scheduled toot with media immediately creating a toot (#9894)
* Add test for not persisting status when attaching media to scheduled toot

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

Fixes #9893

Thanks to tateisu for the help investigating this.
2019-01-21 20:03:04 +01:00
Eugen Rochko a49d43d112 Add scheduled statuses (#9706)
Fix #340
2019-01-05 12:43:28 +01:00
ThibG 5f387995d9 Limit maximum visibility of local silenced users to unlisted (#9583)
Fixes #9580
2018-12-24 19:06:14 +01:00
valerauko db9aea34de Ensure replied-to is a status not a boost (#9129)
* Ensure replied-to is a status not a boost

* Consider case of not a reply

* Add test case for replying to boost

* Move reblog-reply resolution to model

* Remove unnecessary comment
2018-11-25 16:35:21 +01:00
Eugen Rochko cb5b5cb5f7 Slightly reduce RAM usage (#7301)
* No need to re-require sidekiq plugins, they are required via Gemfile

* Add derailed_benchmarks tool, no need to require TTY gems in Gemfile

* Replace ruby-oembed with FetchOEmbedService

Reduce startup by 45382 allocated objects

* Remove preloaded JSON-LD in favour of caching HTTP responses

Reduce boot RAM by about 6 MiB

* Fix tests

* Fix test suite by stubbing out JSON-LD contexts
2018-05-02 18:58:48 +02:00
Yamagishi Kazutoshi b21db9bbde Using double splat operator (#5859) 2017-12-06 11:41:57 +01:00
Akihiko Odaki 48d77ea1eb Fix filterable_languages method of SettingsHelper (#4966) 2017-09-16 14:59:41 +02:00
Eugen Rochko b7370ac8ba ActivityPub delivery (#4566)
* Deliver ActivityPub Like

* Deliver ActivityPub Undo-Like

* Deliver ActivityPub Create/Announce activities

* Deliver ActivityPub creates from mentions

* Deliver ActivityPub Block/Undo-Block

* Deliver ActivityPub Accept/Reject-Follow

* Deliver ActivityPub Undo-Follow

* Deliver ActivityPub Follow

* Deliver ActivityPub Delete activities

Incidentally fix #889

* Adjust BatchedRemoveStatusService for ActivityPub

* Add tests for ActivityPub workers

* Add tests for FollowService

* Add tests for FavouriteService, UnfollowService and PostStatusService

* Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService

* Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService

* Add tests for BatchedRemoveStatusService

* Deliver updates to a local account to ActivityPub followers

* Minor adjustments
2017-08-13 00:44:41 +02:00
Eugen Rochko 8b5179d006 Fix #2402 - Add Idempotency-Key header to PostStatusService that prevents (#2419)
duplicates. Web UI regenerates UUID for that header every time the compose
form is changed or successfully submitted

Also, fix Farsi i18n overwriting the English one
2017-04-25 15:04:49 +02:00
Matt Jankowski 297c11dba2 Language detection refactor (#2099)
* Extract detect_language to separate class

* Use default locale, not just en

* Add spec to confirm that whatlanguage cant identify empty string

* Allow account locale to override default in language detector

* PostStatusService supplies an account to detect language
2017-04-18 22:20:12 +02:00
Chad Pytel ad5ddd5e95 Use I18n for media attachment validation errors
These are currently user facing errors, but are not localized. This adds the
ability for these messages to be localized.
2017-04-07 14:23:18 -04:00
Chad Pytel 13c0077003 Add specs for PostStatusService
This implements all pending specs, and adds additional coverage for the
following functionality:

* Normal status creation
* Creating a reply status
* Creating a sensitive status
* Creating a status with spoiler text
* A status with no spoiler text gets an empty string for spoiler text
* Creating a status with custom visibility
* Creating a status for an application
* Processing mentions
* Processing Hashtags
* Pinging PuSH hubs
* Crawling links
* Attaching media
2017-04-07 14:21:16 -04:00
Chad Pytel 38bec79811 Add specs for media attachment validations
There are currently not specs for the two media validations that are performed
by `PostStatusService`. This adds specs for the validations that ensure that you
cannot attach more than four files, and that a status cannot have both image and
video attachments.
2017-04-07 12:50:43 -04:00
Eugen Rochko 3b4e04dc32 Fixing some bugs, adding pending test examples 2016-03-05 12:50:59 +01:00