Commit Graph

791 Commits (b347d554326c810b82f4a9d9a7042e41b771967f)

Author SHA1 Message Date
Eugen Rochko 7eec279c7f
Change language opt-out to language opt-in ()
* Switch filtered_languages to chosen_languages

* Adjust interface

* Remove unused translations
2018-06-17 13:54:02 +02:00
Shuhei Kitagawa ad8814232f Add tests for following accounts controller () 2018-06-14 10:49:17 +09:00
Shuhei Kitagawa 5b47774ab8 Add tests for followers_accounts_controller () 2018-06-13 10:28:39 +09:00
Shuhei Kitagawa 6151308c47 Add missing tests for admin/accounts_controller () 2018-06-12 21:24:46 +09:00
Shuhei Kitagawa 7086aa598b Add tests for intents_controller () 2018-06-09 22:47:50 +02:00
Eugen Rochko 10f51c9886
Fix domain hiding logic ()
* Send rejections to followers when user hides domain they're on

* Use account domain blocks for "authorized followers" action

Replace soft-blocking (block & unblock) behaviour with follow rejection

* Split sync and async work of account domain blocking

Do not create domain block when removing followers by domain, that
is probably unexpected from the user's perspective.

* Adjust confirmation message for domain block

* yarn manage:translations
2018-06-09 22:46:54 +02:00
Shuhei Kitagawa 12fa2500c4 Add missing tests for sessions controller () 2018-06-06 10:23:22 +09:00
Shuhei Kitagawa 22caa32ba2 Add tests for embeds controller ()
* Small refactoring of status_finder_spec

* Add tests for embeds_controller
2018-06-04 10:35:56 +09:00
Shuhei Kitagawa 00512ecf87 Add tests for migrations_controller () 2018-06-02 18:52:16 +09:00
Eugen Rochko a7d726c383
Improve counter caches on Status and Account ()
Do not touch statuses_count on accounts table when mass-destroying
statuses to reduce load when removing accounts, same for
reblogs_count and favourites_count

Do not count statuses with direct visibility in statuses_count

Fix 
2018-05-30 02:50:23 +02:00
Shuhei Kitagawa b0b34a5e38 Add a test for emojis_controller () 2018-05-28 22:56:58 +09:00
tateisu b87a1229c7 optimize direct timeline ()
* optimize direct timeline

* fix typo in class name

* change filter condition for direct timeline

* fix codestyle issue

* revoke index_accounts_not_silenced because direct timeline does not use it.

* revoke index_accounts_not_silenced because direct timeline does not use it.

* fix rspec test condition.

* fix rspec test condition.

* fix rspec test condition.

* revoke adding column and partial index

* (direct timeline) move merging logic to model

* fix pagination parameter

* add method arguments that switches return array of status or cache_ids

* fix order by

* returns ActiveRecord.Relation in default behavor

* fix codestyle issue
2018-05-28 11:04:06 +02:00
Yamagishi Kazutoshi 6d99a0b652 Fix tests for invites controller (regression from 4d81809f36) () 2018-05-23 06:32:10 +02:00
Shuhei Kitagawa 12e590edd7 Add tests for report notes controller () 2018-05-22 14:45:10 +02:00
Eugen Rochko 8378b72eba
Ensure push subscription is immediately removed when application is revoked ()
* Ensure push subscription is immediately removed when application is revoked

* When token is revoked from app, unsubscribe too
2018-05-19 21:05:08 +02:00
Eugen Rochko 57b503d4ef
Resolve unknown status from Add activity, skip Remove if unknown ()
Fix 
2018-05-18 11:33:56 +02:00
Shuhei Kitagawa b48a166c82 Add tests for account_moderation_notes_controller () 2018-05-17 04:26:51 +02:00
Shuhei Kitagawa 50491e0d92 Add tests for invites controller ()
* Add tests for invites controller

* Small refactoring and fix for invites controller
2018-05-11 13:14:33 +02:00
Eugen Rochko b4fb766b23
Add REST API for Web Push Notifications subscriptions ()
- POST /api/v1/push/subscription
- PUT /api/v1/push/subscription
- DELETE /api/v1/push/subscription
- New OAuth scope: "push" (required for the above methods)
2018-05-11 11:49:12 +02:00
Yamagishi Kazutoshi ac788ad47e Disable simplecov on CircleCI ()
* Disable simplecov on CircleCI

* Remove --format progress
2018-05-09 16:59:58 +02:00
Shuhei Kitagawa ce35d81db7 Add tests for admin/roles_controller () 2018-05-09 08:41:46 +02:00
Shuhei Kitagawa 35eff337d5 Add tests for admin/invites_controller () 2018-05-09 08:41:26 +02:00
Surinna Curtis 01dfd6dbc8 Take the first recognized actor_type. () 2018-05-08 13:30:04 +02:00
Shuhei Kitagawa bd10a7e480 Add resend confirmation for admin ()
* Add confirmations_controller#resend

* Add tests for confirmations_controller#resend

* Add translations
2018-05-06 10:59:03 +02:00
Yamagishi Kazutoshi 8c35d163a5 Port travis_retry for CI ()
* Port travis_retry for CI

* Add license
2018-05-06 10:55:50 +02:00
Eugen Rochko c7d1a2e400
Improve admin UI for accounts ()
* Improve design of account statuses admin UI (consistent with reports)

* Make account moderation notes look consistent with report notes

* i18n-tasks remove-unused

* Fix code style issues

* Fix tests
2018-05-05 23:06:29 +02:00
Shuhei Kitagawa 661f7e6d9d Add tests for admin/custom_emojis_controller () 2018-05-05 15:53:59 +02:00
Eugen Rochko c73ce7b695
Store home feeds for 7 days instead of 14 ()
* Store home feeds for 7 days instead of 14

Reduces workload for status fan-out to active followers

* Fix test for user model
2018-05-05 00:54:24 +02:00
Eugen Rochko 6793bec4c6
Store URIs of follows, follow requests and blocks for ActivityPub ()
Same URI passed between follow request and follow, since they are
the same thing in ActivityPub. Local URIs are generated during
creation using UUIDs and are passed to serializers.
2018-05-04 21:14:34 +02:00
Shuhei Kitagawa 28b366d065 Add missing tests for report.rb () 2018-05-03 10:42:36 +02:00
Eugen Rochko 28bd4b9800
Serialize webfinger XML with Ox instead of Nokogiri ()
25ms -> 0.5ms
2018-05-02 22:28:46 +02:00
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
2018-05-02 18:58:48 +02:00
abcang 71a7cea73f Keep notification when muting_notifications is true ()
* Keep notification when muting_notifications is true

* Retrun mute object

* Fix test
2018-05-02 16:14:51 +02:00
Eugen Rochko c5dcd7d836
Speed up test suite by not generating RSA keys in test environment ()
One RSA keypair for all fabricated test accounts is enough
2018-05-02 15:45:24 +02:00
Shuhei Kitagawa 6c40e567aa Add missing tests for user.rb () 2018-05-02 14:13:52 +02:00
Surinna Curtis dc786c0cf4 Support Actors/Statuses with multiple types ()
* Add equals_or_includes_any? helper in JsonLdHelper

* Support arrays in JSON-LD type fields for actors/tags/objects.

* Spec for resolving accounts with extension types

* Style tweaks for codeclimate
2018-05-02 12:40:24 +02:00
MIYAGI Hikaru eb593a5a0c Append '.test' to hostname in stub data () 2018-04-25 14:12:28 +02:00
Emelia Smith 495303d9b8 Prevent suspended accounts from appearing in AccountSearchService () 2018-04-23 21:27:18 +02:00
Akihiko Odaki 1258efa882 Paginate descendant statuses in public page () 2018-04-23 19:27:35 +02:00
Eugen Rochko 75c4ab9d12
Remove "nsfw" category for sensitive statuses in OStatus serializer ()
Fix 
2018-04-22 22:09:03 +02:00
Yamagishi Kazutoshi 648d645c2f Fix randomly fail (similar ) () 2018-04-22 11:41:39 +02:00
Yamagishi Kazutoshi 3f6893c641 Reset locale on registration tests () 2018-04-21 23:37:07 +02:00
Yamagishi Kazutoshi d10447c3a8 Use raw status code on have_http_status () 2018-04-21 21:35:07 +02:00
Yamagishi Kazutoshi b438224751 Introduce rspec-retry () 2018-04-20 19:31:30 +02:00
Eugen Rochko a9c440637c
Improve report layout ()
* Use table for statuses in report

* Display reported account and reporter in the same table

* Split accounts and general report info into two tables again

* Redesign report statuses table, notes, merge notes and action log

* Remove unused translations

* Fix code style issue

* Fix code style issue

* Fix code style issue
2018-04-20 02:28:48 +02:00
Kaito Sinclaire 156b916caf Direct messages column ()
* Added a timeline for Direct statuses
* Lists all Direct statuses you've sent and received
* Displayed in Getting Started
* Streaming server support for direct TL

* Changes to match other timelines in 2.0
2018-04-18 13:09:06 +02:00
Akihiko Odaki a1049e9380 Redirect to account status page for page of status stream entry ()
Commit 519119f657 missed a change for
stream entry page. Instead of duplicating the change, redirect to account
status page. It would also help crawlers (of search engines, for example)
to understand a stream entry URL and its corresponding status URL points
to the same page.
2018-04-16 10:04:31 +02:00
Eugen Rochko 78ed4ab75f
Add bio fields ()
* Add bio fields

- Fix 
- Fix 
- Fix 

* Display bio fields in web UI

* Fix output of links and missing fields

* Federate bio fields over ActivityPub as PropertyValue

* Improve how the fields are stored, add to Edit profile form

* Add rel=me to links in fields

Fix 
2018-04-14 12:41:08 +02:00
Renato "Lond" Cerqueira 14d86eb0d0 Allow more than the max pins if account is not local ()
Sidekiq sometimes throws errors for users that have more pinned items
than the allowed by the local instance. It should only validate the
number of pins for local accounts.
2018-04-12 20:36:02 +02:00
Alexander 8e88a18316 update gem, test pam authentication ()
* update gem, test pam authentication

* add description for test parameters

* fix inclusion of optional group
2018-04-11 21:40:38 +02:00