Fix rubocop offenses.
This commit is contained in:
parent
17dda66400
commit
639784ec81
12
plugin.rb
12
plugin.rb
|
@ -87,16 +87,18 @@ SQL
|
||||||
post.save!
|
post.save!
|
||||||
|
|
||||||
if defined?(UserAction::SOLVED)
|
if defined?(UserAction::SOLVED)
|
||||||
UserAction.log_action!(action_type: UserAction::SOLVED,
|
UserAction.log_action!(
|
||||||
|
action_type: UserAction::SOLVED,
|
||||||
user_id: post.user_id,
|
user_id: post.user_id,
|
||||||
acting_user_id: guardian.user.id,
|
acting_user_id: guardian.user.id,
|
||||||
target_post_id: post.id,
|
target_post_id: post.id,
|
||||||
target_topic_id: post.topic_id)
|
target_topic_id: post.topic_id
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
unless current_user.id == post.user_id
|
unless current_user.id == post.user_id
|
||||||
|
Notification.create!(
|
||||||
Notification.create!(notification_type: Notification.types[:custom],
|
notification_type: Notification.types[:custom],
|
||||||
user_id: post.user_id,
|
user_id: post.user_id,
|
||||||
topic_id: post.topic_id,
|
topic_id: post.topic_id,
|
||||||
post_number: post.post_number,
|
post_number: post.post_number,
|
||||||
|
@ -108,7 +110,7 @@ SQL
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (auto_close_hours = SiteSetting.solved_topics_auto_close_hours) > 0 and !topic.closed
|
if (auto_close_hours = SiteSetting.solved_topics_auto_close_hours) > (0) && !topic.closed
|
||||||
topic.set_or_create_timer(
|
topic.set_or_create_timer(
|
||||||
TopicTimer.types[:close],
|
TopicTimer.types[:close],
|
||||||
auto_close_hours,
|
auto_close_hours,
|
||||||
|
|
Loading…
Reference in New Issue