Commit Graph

25 Commits (28966fa0a6d7b98ee94696acdc79e45449ce8349)

Author SHA1 Message Date
Matt Jankowski f1300ad284
Rename jobs/attachments rspec tag names ()
Matt Jankowski f287462f76
Fix repeated Delete/Undo assertion in remove status service spec ()
Matt Jankowski 469028b6d3
Remove unneeded `type: :service` from spec/services files ()
MitarashiDango 2c05b8a60d
Fix Undo Announce activity is not sent, when not followed by the reblogged post author ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Matt Jankowski 00341c70ff
Use Sidekiq `fake!` instead of `inline!` in specs ()
Matt Jankowski 5dc634796a
Misc coverage improvements re: sidekiq/inline ()
Matt Jankowski 9251779d75
Fix `RSpec/LetSetup` cop in spec/services ()
Matt Jankowski 69d00e2721
Fix `RSpec/InstanceVariable` cop ()
Claire f18618d7f9
Fix some incorrect tests ()
Matt Jankowski c42591356d
Fix `RSpec/DescribedClass` cop ()
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs ()
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length ()
Claire d4e6774a0c
Fix Undo Announce sometimes inlining the originally Announced status ()
* Change tests to have more specific expectations on sent ActivityPub payloads

* Check that payload doesn't actually contain the contents of the boosted toot

* Fix Undo Announce sometimes inlining the originally Announced status
Claire e38fc319dc
Refactor and improve tests ()
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
Eugen Rochko 1294f9ee4f
Remove PubSubHubbub-related columns from accounts table ()
ThibG 43961035a9
Fix some notifications not being deleted on poll/status deletion ()
* Fix deleting polls not deleting notifications

* Fix fav notification deletion when deleting a toot

* Refactor DeleteAccountService spec

* Add DeleteAccountService tests for other associations and notifications

* Add favourite handling spec in status removal

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko bd87e66679
Remove WebSub subscriptions ()
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 a49d43d112
Add scheduled statuses ()
Fix 
Eugen Rochko cb5b5cb5f7
Slightly reduce RAM usage ()
* 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
Eugen Rochko 24cafd73a2
Lists ()
* Add structure for lists

* Add list timeline streaming API

* Add list APIs, bind list-account relation to follow relation

* Add API for adding/removing accounts from lists

* Add pagination to lists API

* Add pagination to list accounts API

* Adjust scopes for new APIs

- Creating and modifying lists merely requires "write" scope
- Fetching information about lists merely requires "read" scope

* Add test for wrong user context on list timeline

* Clean up tests
Akihiko Odaki bb4d005a83 Introduce OStatus::TagManager ()
unarist 7876aed134 Fix deletion of status which has been reblogged ()
Eugen Rochko b7370ac8ba ActivityPub delivery ()
* 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 

* 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
Eugen Rochko ce812466c7 Fix removal of status sending the original status to mentioned users instead of delete Salmon ()
* Fix removal of status sending the original status to mentioned users instead
of delete Salmon, add test

* Create remove_status_service_spec.rb