mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FEATURE: in:private keyword for searching private messages
This commit is contained in:
parent
bc772233a7
commit
b08f724e2b
1 changed files with 9 additions and 0 deletions
|
@ -106,6 +106,12 @@ class Search
|
|||
@search_context = @opts[:search_context]
|
||||
@include_blurbs = @opts[:include_blurbs] || false
|
||||
@limit = Search.per_facet
|
||||
|
||||
if @search_pms && @guardian.user
|
||||
@opts[:type_filter] = "private_messages"
|
||||
@search_context = @guardian.user
|
||||
end
|
||||
|
||||
if @opts[:type_filter].present?
|
||||
@limit = Search.per_filter
|
||||
end
|
||||
|
@ -183,6 +189,9 @@ class Search
|
|||
elsif word == 'in:tracking'
|
||||
@notification_level = TopicUser.notification_levels[:tracking]
|
||||
nil
|
||||
elsif word == 'in:private'
|
||||
@search_pms = true
|
||||
nil
|
||||
else
|
||||
word
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue