about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-04-22 10:06:11 +0200
committerClaire <claire.github-309c@sitedethib.com>2023-04-22 10:06:11 +0200
commitabfdafef1ededdb87f018414edd6b25fa9a70525 (patch)
tree7a9855d79d125333a6b1307215b73dd507475320 /app/models
parentf30c5e7f15f967019245d2c78f3c2e89800eb838 (diff)
parent4db8230194258a9a1c3d17d7261608515f3f2067 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/auth/setup_controller.rb`:
  Upstream removed a method close to a glitch-soc theming-related method.
  Removed the method like upstream did.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account_filter.rb2
-rw-r--r--app/models/preview_card_provider.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb
index 1666ea883..55d34e85c 100644
--- a/app/models/account_filter.rb
+++ b/app/models/account_filter.rb
@@ -55,7 +55,7 @@ class AccountFilter
     when 'by_domain'
       Account.where(domain: value.to_s.strip)
     when 'username'
-      Account.matches_username(value.to_s.strip)
+      Account.matches_username(value.to_s.strip.delete_prefix('@'))
     when 'display_name'
       Account.matches_display_name(value.to_s.strip)
     when 'email'
diff --git a/app/models/preview_card_provider.rb b/app/models/preview_card_provider.rb
index 1dd95fc91..9f5f6d3cb 100644
--- a/app/models/preview_card_provider.rb
+++ b/app/models/preview_card_provider.rb
@@ -18,6 +18,7 @@
 #
 
 class PreviewCardProvider < ApplicationRecord
+  include Paginable
   include DomainNormalizable
   include Attachmentable