mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:51:07 +08:00
DEV: Apply syntax_tree formatting to app/*
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ComposerMessagesController < ApplicationController
|
||||
|
||||
requires_login
|
||||
|
||||
def index
|
||||
finder = ComposerMessagesFinder.new(current_user, params.slice(:composer_action, :topic_id, :post_id))
|
||||
finder =
|
||||
ComposerMessagesFinder.new(current_user, params.slice(:composer_action, :topic_id, :post_id))
|
||||
json = { composer_messages: [finder.find].compact }
|
||||
|
||||
if params[:topic_id].present?
|
||||
@ -25,14 +25,24 @@ class ComposerMessagesController < ApplicationController
|
||||
warning_message = nil
|
||||
|
||||
if user_count > 0
|
||||
message_locale = if user_count == 1
|
||||
"education.user_not_seen_in_a_while.single"
|
||||
else
|
||||
"education.user_not_seen_in_a_while.multiple"
|
||||
end
|
||||
message_locale =
|
||||
if user_count == 1
|
||||
"education.user_not_seen_in_a_while.single"
|
||||
else
|
||||
"education.user_not_seen_in_a_while.multiple"
|
||||
end
|
||||
end
|
||||
|
||||
json = { user_count: user_count, usernames: users, time_ago: FreedomPatches::Rails4.time_ago_in_words(SiteSetting.pm_warn_user_last_seen_months_ago.month.ago, true, scope: :'datetime.distance_in_words_verbose') }
|
||||
json = {
|
||||
user_count: user_count,
|
||||
usernames: users,
|
||||
time_ago:
|
||||
FreedomPatches::Rails4.time_ago_in_words(
|
||||
SiteSetting.pm_warn_user_last_seen_months_ago.month.ago,
|
||||
true,
|
||||
scope: :"datetime.distance_in_words_verbose",
|
||||
),
|
||||
}
|
||||
render_json_dump(json)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user