chinwagsocial/app/controllers
0x2019 012537452a
Fix error resposes for from search prefix (#17963)
* Fix error responses in `from` search prefix (addresses mastodon/mastodon#17941)

Using unsupported prefixes now reports a 422; searching for posts from an
account the instance is not aware of reports a 404. TODO: The UI for this
on the front end is abysmal.

Searching `from:username@domain` now succeeds when `domain` is the local
domain; searching `from:@username(@domain)?` now works as expected.

* Remove unused methods on new Error classes as they are not being used

Currently when `raise`d there are error messages being supplied, but
this is not actually being used. The associated `raise`s have been
edited accordingly.

* Remove needless comments

* Satisfy rubocop

* Try fixing tests being unable to find AccountFindingConcern methods

* Satisfy rubocop

* Simplify `from` prefix logic

This incorporates @ClearlyClaire's suggestion (see
https://github.com/mastodon/mastodon/pull/17963#pullrequestreview-933986737).

Accepctable account strings in `from:` clauses are more lenient than
before this commit; for example, `from:@user@example.org@asnteo +cat`
will not error, and return posts by @user@example.org containing the
word "cat". This is more consistent with how Mastodon matches mentions
in statuses. In addition, `from` clauses will not be checked for
syntatically invalid usernames or domain names, simply 404ing when
`Account.find_remote!` raises ActiveRecord::NotFound.

New code for this PR that is no longer used has been removed.
2022-04-08 21:21:49 +02:00
..
activitypub Fix locale not being set in REST API (#17847) 2022-03-22 12:29:04 +01:00
admin Remove sign-in token authentication, instead send e-mail about new sign-in (#17970) 2022-04-06 20:58:12 +02:00
api Fix error resposes for from search prefix (#17963) 2022-04-08 21:21:49 +02:00
auth Remove sign-in token authentication, instead send e-mail about new sign-in (#17970) 2022-04-06 20:58:12 +02:00
concerns Remove sign-in token authentication, instead send e-mail about new sign-in (#17970) 2022-04-06 20:58:12 +02:00
disputes Change old moderation strikes to be displayed in a separate page (#17566) 2022-03-01 19:37:47 +01:00
oauth
settings Change e-mail notifications to only be sent when recipient is offline (#17984) 2022-04-08 18:03:31 +02:00
well_known
about_controller.rb
account_follow_controller.rb
account_unfollow_controller.rb
accounts_controller.rb
application_controller.rb
authorize_interactions_controller.rb Add specific rate limits for posting and following (#13172) 2020-03-08 15:17:39 +01:00
custom_css_controller.rb
directories_controller.rb
emojis_controller.rb
filters_controller.rb
follower_accounts_controller.rb Add /api/v1/accounts/familiar_followers to REST API (#17700) 2022-03-07 09:36:47 +01:00
following_accounts_controller.rb Add /api/v1/accounts/familiar_followers to REST API (#17700) 2022-03-07 09:36:47 +01:00
health_controller.rb Change health check (#15988) 2021-04-03 02:39:04 +02:00
home_controller.rb Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
instance_actors_controller.rb Fix instance actor not being dereferenceable (#17457) 2022-02-06 15:31:03 +01:00
intents_controller.rb
invites_controller.rb Add invite comments (#10465) 2019-08-19 11:40:42 +02:00
manifests_controller.rb
media_controller.rb
media_proxy_controller.rb
public_timelines_controller.rb
relationships_controller.rb
remote_follow_controller.rb
remote_interaction_controller.rb
shares_controller.rb Fix blurhash and autoplay not working on public pages (#11585) 2019-08-16 19:15:05 +02:00
statuses_cleanup_controller.rb
statuses_controller.rb
tags_controller.rb