Commit Graph
53 Commits
Author SHA1 Message Date
Claire 405a49df44 Merge commit from fork
* Refuse granting quote authorization for reblogs

* Add validation to reject quotes of reblogs

* Do not process quotes of reblogs as potentially valid quotes

* Refuse to serve quoted reblogs over REST API
2025-10-21 15:00:28 +02:00
Claire d4a4a7177a Fix crash when serializing quotes of deleted posts for ActivityPub (#36381) 2025-10-09 13:52:38 +00:00
Claire 82b26603fe Fix quote posts with CW and no text being rejected (#36095) 2025-09-12 13:10:31 +00:00
Claire 591df1f205 Add support for local quote stamps (#35626) 2025-08-01 14:55:25 +00:00
Claire 989ca63b59 Remove inbound_quotes feature flag (#34958) 2025-06-06 08:25:59 +00:00
Claire 3e5d78cc5b Fix crash when likes or shares collections are not inlined (#34618) 2025-05-06 07:39:26 +00:00
Claire 8489f6c8fc Fix namespace of QuoteAuthorization type in specs (#34481) 2025-04-17 09:19:23 +00:00
Claire df2611a10f Add initial support for ingesting and verifying remote quote posts (#34370) 2025-04-17 07:45:23 +00:00
Claire 1248c4d1f4 Fix handling of duplicate mentions in incoming status Update (#33911) 2025-02-12 15:34:56 +00:00
Matt Jankowski 2cfc2a777a Add build_object method for defaults in AP::Activity::Create spec (#33537) 2025-01-10 11:59:19 +00:00
Matt Jankowski efcd4ea5de Reference value constants from specs (#33479) 2025-01-06 23:25:13 +00:00
Matt Jankowski 441dcd7396 Fix intermittent failure on ap/activity/create spec timestamp check (#33406) 2025-01-02 08:38:22 +00:00
Matt Jankowski d2fbf42b0e Avoid validate: false save in expired poll create activity spec (#33367) 2024-12-20 13:34:05 +00:00
Claire 344e2903b3 Fix featured tags for remote accounts not being kept up to date (#33372) 2024-12-20 11:50:31 +00:00
Jonny Saunders 9074c1fac9 Use likes and shares totalItems on status creations and updates (#32620) 2024-10-28 04:55:18 +00:00
Jeong ArmandClaire 66b2bc1c84 Ignore error if mentioned account was not processable (#29215)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-10-02 08:08:02 +00:00
Matt Jankowski 5405bdd344 Remove unused E2EE messaging code (#31193) 2024-09-18 09:27:43 +00:00
Matt Jankowski ed4939296a Reduce RSpec/MultipleExpectations in ap/activity/create spec (#29224) 2024-02-16 07:43:00 +00:00
Claire 087415d0fe Add tests for processing statuses using bearcap URIs (#28904) 2024-01-25 11:13:36 +00:00
Matt Jankowski 00341c70ff Use Sidekiq fake! instead of inline! in specs (#25369) 2024-01-10 11:06:58 +00:00
Claire 2bf84b93d4 Fix media attachment order of remote posts (#28469) 2023-12-22 15:10:39 +00:00
Matt Jankowski 973597c6f1 Consolidate configuration of Sidekiq::Testing.fake! setup (#28046) 2023-11-23 09:43:43 +00:00
Claire c0989b78f8 Fix incoming status creation date not being restricted to standard ISO8601 (#27655) 2023-11-06 09:28:14 +00:00
Claire 0337df3a42 Fix posts from threads received out-of-order sometimes not being inserted into timelines (#27653) 2023-11-02 14:58:37 +00:00
Matt Jankowski 710745e16b Fix RSpec/ContextWording cop (#24739) 2023-05-04 05:49:08 +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 4552685f6b Autofix Rubocop RSpec/LeadingSubject (#23670) 2023-02-20 13:24:14 +09:00
Nick Schonning 5179c47087 Autofix Rubocops RSpec/ScatteredLet (#23725) 2023-02-20 11:17:41 +09:00
Nick Schonning 5069769cbe Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 2023-02-18 23:33:41 +09:00
Nick Schonning 634368c491 Autofix Rubocop Lint/SymbolConversion (#23683) 2023-02-18 03:23:49 +01:00
Nick Schonning 669f6d2c0a Run rubocop formatting except line length (#23632) 2023-02-18 06:56:20 +09:00
Claire 0360135d4d Fix PeerTube videos appearing with an erroneous “Edited at” marker (#18100)
* Fix PeerTube videos appearing with an erroneous “Edited at” marker

PeerTube videos have an `updated` field equal to `published`.
When processing an incoming activity that has the same value for `updated` and
`published`, assume this doesn't represent an actual edit.

* Please CodeClimate
2022-04-26 21:25:26 +02:00
Claire 1c4dee4554 Fix Mastodon not understanding as:Public and Public (#15948)
Fixes #5551
2021-03-24 10:19:40 +01:00
ThibG 720214feb0 Add support for inlined objects in activity audience (#14514)
* Add support for inlined objects in activity audience

* Add tests
2020-08-24 14:11:47 +02:00
ThibG a1412491b7 Change content-type to be always computed from file data (#14452)
* Change content-type to be always computed from file data

Restore previous behavior, detecting the content-type isn't very
expensive, and some instances may serve files as application/octet-stream
regardless of their true type, making fetching media from them fail, while
it used to work pre-3.2.0.

* Add test
2020-08-02 11:21:10 +02:00
Eugen Rochko 5d8398c8b8 Add E2EE API (#13820) 2020-06-02 19:24:53 +02:00
ThibG a319c1e60f Add support for summary field for media description (#13763) 2020-05-15 17:08:59 +02:00
ThibG da2143b308 Fixes featured hashtag setting page erroring out instead of rejecting invalid tags (#12436)
* Revert "Fix ignoring whole status because of one invalid hashtag (#11621)"

This reverts commit dff46b260b.

* Fix statuses being rejected because of invalid hashtag names

* Add spec for invalid hashtag names in statuses

* Add test for featured tags controller
2019-12-17 13:31:56 +01:00
ThibG 650820d62d Fix remote media descriptions being cut off at 420 chars (#12262)
* Fix remote media descriptions being cut off at 420 chars

Fixes #12258

* Fix tests
2019-11-04 13:00:16 +01:00
Eugen Rochko f1bc90ab50 Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)
Also, fix some n+1 queries

Resolve #10365
2019-03-28 04:44:59 +01:00
ThibG 3aaac4f134 Do not allow adding votes to expired polls (#10214)
* Do not allow adding votes to expired polls

* Only validate expires_at on create
2019-03-08 00:54:50 +01:00
Eugen Rochko 0a39c81dd8 Add test ensuring that unknown object types are rejected (#10166) 2019-03-05 11:46:36 +09:00
ThibG 833ffce2df Store remote votes URI (#10158)
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
2019-03-04 22:51:23 +01:00
Eugen Rochko 0e6998da3c Add tests for ActivityPub poll processing (#10143) 2019-03-04 01:13:42 +01:00
Eugen Rochko 147b4c2c3a Add logging for rejected ActivityPub payloads and add tests (#10062) 2019-02-17 03:38:25 +01:00
Eugen Rochko ddd30f331c Improve support for aspects/circles (#8950)
* Add silent column to mentions

* Save silent mentions in ActivityPub Create handler and optimize it

Move networking calls out of the database transaction

* Add "limited" visibility level masked as "private" in the API

Unlike DMs, limited statuses are pushed into home feeds. The access
control rules between direct and limited statuses is almost the same,
except for counter and conversation logic

* Ensure silent column is non-null, add spec

* Ensure filters don't check silent mentions for blocks/mutes

As those are "this person is also allowed to see" rather than "this
person is involved", therefore does not warrant filtering

* Clean up code

* Use Status#active_mentions to limit returned mentions

* Fix code style issues

* Use Status#active_mentions in Notification

And remove stream_entry eager-loading from Notification
2018-10-17 17:13:04 +02:00
Eugen Rochko 44829d8216 Fix missing focalPoint in ActivityPub JSON (#6609) 2018-03-04 07:21:41 +01:00
Eugen Rochko e4a241abef Fix bad URL schemes being accepted (#6219)
* Fix actors accepting invalid URI schemes or different host between URI and URL

* Fix statuses accepting invalid URI scheme or different host to actor

* Adjust tests to new requirements

* Improve readability of mismatching_origin?/invalid_origin? methods
2018-01-08 05:00:23 +01:00
Eugen Rochko 3a3475450e Encode custom emojis as resolveable objects in ActivityPub (#5243)
* Encode custom emojis as resolveable objects in ActivityPub

* Improve code style
2017-10-07 17:43:42 +02:00