Added onlyVerified for searching account.rb

• Added:
- onlyVerified for searching account.rb

• Todo:
- fully implement
This commit is contained in:
mgabdev 2020-08-06 23:12:19 -05:00
parent e72cb27362
commit e4b7328174
1 changed files with 4 additions and 2 deletions

View File

@ -405,8 +405,9 @@ class Account < ApplicationRecord
DeliveryFailureTracker.filter(urls) DeliveryFailureTracker.filter(urls)
end end
def search_for(terms, limit = 10, offset = 0) def search_for(terms, limit = 10, offset = 0, options = {})
textsearch, query = generate_query_for_search(terms) textsearch, query = generate_query_for_search(terms)
@onlyVerified = options[:onlyVerified] || false
sql = <<-SQL.squish sql = <<-SQL.squish
SELECT SELECT
@ -426,8 +427,9 @@ class Account < ApplicationRecord
records records
end end
def advanced_search_for(terms, account, limit = 10, following = false, offset = 0) def advanced_search_for(terms, account, limit = 10, following = false, offset = 0, options = {})
textsearch, query = generate_query_for_search(terms) textsearch, query = generate_query_for_search(terms)
@onlyVerified = options[:onlyVerified] || false
sql = <<-SQL.squish sql = <<-SQL.squish
SELECT SELECT