LINT ALL THE THINGS
This commit is contained in:
parent
f24ab50fa4
commit
d89b60da2e
13
plugin.rb
13
plugin.rb
|
@ -281,11 +281,12 @@ after_initialize do
|
|||
if category_id
|
||||
if include_subcategories
|
||||
accepted_solutions =
|
||||
accepted_solutions
|
||||
.where("topics.category_id IN (?)", Category.subcategory_ids(category_id))
|
||||
accepted_solutions.where(
|
||||
"topics.category_id IN (?)",
|
||||
Category.subcategory_ids(category_id),
|
||||
)
|
||||
else
|
||||
accepted_solutions =
|
||||
accepted_solutions.where("topics.category_id = ?", category_id)
|
||||
accepted_solutions = accepted_solutions.where("topics.category_id = ?", category_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -400,9 +401,7 @@ after_initialize do
|
|||
end
|
||||
|
||||
register_modifier(:user_action_stream_builder) do |builder|
|
||||
builder
|
||||
.where("t.deleted_at IS NULL")
|
||||
.where("t.archetype <> ?", Archetype.private_message)
|
||||
builder.where("t.deleted_at IS NULL").where("t.archetype <> ?", Archetype.private_message)
|
||||
end
|
||||
|
||||
TopicList.preloaded_custom_fields << ::DiscourseSolved::ACCEPTED_ANSWER_POST_ID_CUSTOM_FIELD
|
||||
|
|
|
@ -601,13 +601,11 @@ RSpec.describe "Managing Posts solved status" do
|
|||
t2.convert_to_private_message(Discourse.system_user)
|
||||
|
||||
expect(
|
||||
UserAction
|
||||
.stream(
|
||||
UserAction.stream(
|
||||
user_id: user.id,
|
||||
action_types: [::UserAction::SOLVED],
|
||||
guardian: user.guardian
|
||||
)
|
||||
.map(&:post_id)
|
||||
guardian: user.guardian,
|
||||
).map(&:post_id),
|
||||
).to contain_exactly p3.id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue