Commit graph

106 commits

Author SHA1 Message Date
KMY(雪あすか)
8cd1d7e5d0 Remove: #454 リンクプレビューを生成する設定の削除、無効化 (#458) 2024-01-19 08:24:45 +09:00
KMY
4355dfc64f Merge remote-tracking branch 'parent/main' into upstream-20231225 2023-12-25 09:59:33 +09:00
Matt Jankowski
c753b1ad35
Clean up of RSpec/LetSetup within spec/models (#28444) 2023-12-21 09:18:38 +00:00
KMY(雪あすか)
7b8fedb3cd
Add: #363 特定サーバーの投稿にスタンプを付けることを禁止する管理者設定 (#364)
* Add: #363 特定サーバーの投稿にスタンプを付けることを禁止する管理者設定

* Fix test
2023-12-19 08:33:06 +09:00
KMY(雪あすか)
08f2fcb72b
Test: スタンプ関係のテストを共通化 (#361) 2023-12-15 10:18:43 +09:00
KMY(雪あすか)
903b9ad347
Add: #30 ローカルユーザーからのスタンプに関するポリシー設定 (#354) 2023-12-12 09:44:10 +09:00
KMY
94c2396a34 Merge remote-tracking branch 'parent/main' into upstream-20231204 2023-12-04 12:04:52 +09:00
Matt Jankowski
440b80b2e7
Model concerns organization into module namespaces (#28149) 2023-12-01 11:00:41 +00:00
KMY
c5e4020922 Merge remote-tracking branch 'parent/main' into upstream-20231124 2023-11-24 09:07:40 +09:00
Matt Jankowski
d2aacea8da
Reduce .times usage in AccountSearch spec, use constant for default limit (#27946) 2023-11-20 09:08:22 +00:00
KMY
24371d6b2a Merge remote-tracking branch 'parent/main' into upstream-20231116 2023-11-15 13:01:29 +09:00
Matt Jankowski
b2c5b20ef2
Fix RSpec/AnyInstance cop (#27810) 2023-11-14 14:52:59 +00:00
KMY
b992e673c7 Merge branch 'kb_development' into upstream-20231021 2023-10-22 14:42:08 +09:00
KMY(雪あすか)
eb52b72152
Fix: 他のサーバー同士のスタンプでemoji_reaction_policyが適用される問題 (#165)
* Fix: 他のサーバー同士のスタンプで`emoji_reaction_policy`が適用される問題

* こっちに変更

* #161 テストを追加

* テスト修正
2023-10-22 09:46:19 +09:00
KMY
f9eaaec4e7 Merge remote-tracking branch 'parent/main' into upstream-20231021 2023-10-21 10:32:06 +09:00
Matt Jankowski
bcd0171e5e
Fix Lint/UselessAssignment cop (#27472) 2023-10-19 16:55:06 +02:00
Matt Jankowski
a1b27d8b61
Fix Naming/VariableNumber cop (#27447) 2023-10-18 14:26:22 +02:00
KMY
583f5fe906 他のテストも修正 2023-10-07 15:31:35 +09:00
KMY
7cd6252841 Fix: Accountのテストがたまに落ちる問題(Mastodon本家の問題?) 2023-10-07 14:09:02 +09:00
KMY
e82444634a Merge remote-tracking branch 'parent/main' into kb_development 2023-10-04 14:17:41 +09:00
Matt Jankowski
c676bc91e9
Dont match mention in url query string (#25656)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-10-03 17:01:45 +02:00
S.H
696e4a10d6
独自機能の追加などで他の部分への影響が分かるようにCI周りの修正 (#1)
* Fix EmojiFormatter failure

* Add notification_emails.warning setting default value

* Fix list spec failure and add antennas for spec response

* Fix domain block spec failure to add kb custom response

* Fix SearchQueryTransformer spec failure

* Fix Account#matches_display_name spec failure

* Fix UpdateStatusService changes mentions spec failure

* Fix RuboCop Lint

* Ignore brakeman warning

* Fix CI failure for ignore brakeman warning

* Fix migration failure

* Fix README

* Fix migration CI failure

* Fix some spec failure

* Format code for RuboCop lint failure

* Fix ESlint failure

* Fix haml-lint failure
2023-08-07 21:38:15 +09:00
Claire
1e3b19230a
Add stricter protocol fields validation for accounts (#25937) 2023-07-20 18:23:48 +02:00
Matt Jankowski
c75df62ccc
Fix RSpec/SubjectDeclaration cop (#25312) 2023-07-12 09:49:33 +02:00
Matt Jankowski
6c0e3f490a
Fix RSpec/MissingExampleGroupArgument cop (#25310) 2023-06-06 15:51:42 +02:00
Matt Jankowski
c42591356d
Fix RSpec/DescribedClass cop (#25104) 2023-06-06 13:58:33 +02:00
Nick Schonning
99e2e9b81f
Fix minor typos in comments and spec names (#21831) 2023-05-19 17:13:29 +02:00
Matt Jankowski
c97b611b6b
Fix RSpec/InferredSpecType cop (#24736) 2023-05-04 05:49:53 +02:00
Matt Jankowski
710745e16b
Fix RSpec/ContextWording cop (#24739) 2023-05-04 05:49:08 +02:00
Matt Jankowski
570079f8ce
Fix Performance/TimesMap cop (#24789) 2023-05-02 18:07:16 +02:00
Matt Jankowski
274d561430
Enable local account key generation spec (#24728) 2023-04-30 02:28:52 +02:00
Nick Schonning
a3393d0d07
Autofix Rubocop RSpec/MatchArray (#24050) 2023-04-26 20:21:54 +02:00
Matt Jankowski
cd99fa8ceb
Fabricator specs (#23925) 2023-03-04 17:12:09 +01: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
bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 2023-02-20 06:14:10 +01:00
Nick Schonning
4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 2023-02-20 13:24:14 +09: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
3680e032b4
Autofix Rubocop RSpec/EmptyLineAfterFinalLet (#23707) 2023-02-19 07:10:19 +09:00
Claire
70415714f1
Add follow request banner on account header (#20785)
* Add requested_by to relationship maps

* Display whether an account has requested to follow you on their profile
2022-12-15 18:50:11 +01:00
Jeong Arm
d412147d02
Save avatar or header correctly even if other one fails (#18465)
* Save avatar or header correctly if other one fails

* Fix test
2022-12-15 17:11:14 +01:00
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`
2022-11-08 17:32:03 +01:00
Roni Laukkarinen
36b0ff57b7
Fix grammar (#20106) 2022-11-08 16:35:42 +01:00
Eugen Rochko
44b2ee3485
Add customizable user roles (#18641)
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
2022-07-05 02:41:40 +02:00
Claire
440eb71310
Change unapproved and unconfirmed account to not be accessible in the REST API (#17530)
* Change unapproved and unconfirmed account to not be accessible in the REST API

* Change Account#searchable? to reject unconfirmed and unapproved users

* Disable search for unapproved and unconfirmed users in Account.search_for

* Disable search for unapproved and unconfirmed users in Account.advanced_search_for

* Remove unconfirmed and unapproved accounts from Account.searchable scope

* Prevent mentions to unapproved/unconfirmed accounts

* Fix some old tests for Account.advanced_search_for

* Add some Account.advanced_search_for tests for existing behaviors

* Add some tests for Account.search_for

* Add Account.advanced_search_for tests unconfirmed and unapproved accounts

* Add Account.searchable tests

* Fix Account.without_unapproved scope potentially messing with previously-applied scopes

* Allow lookup of unconfirmed/unapproved accounts through /api/v1/accounts/lookup

This is so that the API can still be used to check whether an username is free
to use.
2022-05-26 15:50:33 +02:00
Claire
e38fc319dc
Refactor and improve tests (#17386)
* 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.
2022-01-28 00:46:42 +01:00
Claire
02a87431cf
Fix error when suspending user with an already-existing canonical email block (#17036)
* Fix error when suspending user with an already-existing canonical email block

Fixes #17033

While attempting to create a `CanonicalEmailBlock` with an existing hash would
raise an `ActiveRecord::RecordNotUnique` error, this being done within a
transaction would cancel the whole transaction. For this reason, checking for
uniqueness in Rails would query the database within the transaction and avoid
invalidating the whole transaction for this reason.

A race condition is still possible, where multiple accounts sharing a canonical
email would be blocked in concurrent transactions, in which only one would
succeed, but that is way less likely to happen that the current issue, and can
always be retried after the first failure, unlike the current situation.

* Add tests
2021-11-24 17:41:03 +01:00
Claire
5cc45d22d3
Remove subscription_expires_at leftover from OStatus (#15857) 2021-03-12 05:25:24 +01:00
Eugen Rochko
216b85b053
Fix performance on instances list in admin UI (#15282)
- Reduce duplicate queries
- Remove n+1 queries
- Add accounts count to detailed view
- Add separate action log entry for updating existing domain blocks
2020-12-14 09:06:34 +01:00