about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-04 21:06:04 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-04 21:06:04 +0200
commit54ea7f5dfeb2ecbad6362b050e234da366906666 (patch)
tree5568a6faf666092abeff04b83dcba53c448f591d /app/controllers
parenta82f2e4b824ee09419871d6cbb5284368dd83f24 (diff)
Case-insensitive search by usernames
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/accounts_controller.rb2
-rw-r--r--app/controllers/stream_entries_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index f4073d093..162e85dec 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -29,7 +29,7 @@ class AccountsController < ApplicationController
   private
 
   def set_account
-    @account = Account.find_by!(username: params[:username], domain: nil)
+    @account = Account.find_local!(params[:username])
   end
 
   def set_webfinger_header
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb
index cbf7bfdff..1e50d3b60 100644
--- a/app/controllers/stream_entries_controller.rb
+++ b/app/controllers/stream_entries_controller.rb
@@ -16,7 +16,7 @@ class StreamEntriesController < ApplicationController
   private
 
   def set_account
-    @account = Account.find_by!(username: params[:account_username], domain: nil)
+    @account = Account.find_local!(params[:account_username])
   end
 
   def set_stream_entry