mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
DEV: Fix various rubocop lints (#24749)
These (21 + 3 from previous PRs) are soon to be enabled in rubocop-discourse: Capybara/VisibilityMatcher Lint/DeprecatedOpenSSLConstant Lint/DisjunctiveAssignmentInConstructor Lint/EmptyConditionalBody Lint/EmptyEnsure Lint/LiteralInInterpolation Lint/NonLocalExitFromIterator Lint/ParenthesesAsGroupedExpression Lint/RedundantCopDisableDirective Lint/RedundantRequireStatement Lint/RedundantSafeNavigation Lint/RedundantStringCoercion Lint/RedundantWithIndex Lint/RedundantWithObject Lint/SafeNavigationChain Lint/SafeNavigationConsistency Lint/SelfAssignment Lint/UnreachableCode Lint/UselessMethodDefinition Lint/Void Previous PRs: Lint/ShadowedArgument Lint/DuplicateMethods Lint/BooleanSymbol RSpec/SpecFilePathSuffix
This commit is contained in:
@@ -111,7 +111,7 @@ module Chat
|
||||
|
||||
def should_create_revision(new_message, prev_message, guardian)
|
||||
max_seconds = SiteSetting.chat_editing_grace_period
|
||||
seconds_since_created = Time.now.to_i - new_message&.created_at.iso8601.to_time.to_i
|
||||
seconds_since_created = Time.now.to_i - new_message&.created_at&.iso8601&.to_time.to_i
|
||||
return true if seconds_since_created > max_seconds
|
||||
|
||||
max_edited_chars =
|
||||
|
||||
@@ -38,7 +38,7 @@ module Service
|
||||
# context.fail!("failure": "something went wrong")
|
||||
# @return [Context]
|
||||
def fail!(context = {})
|
||||
fail(context)
|
||||
self.fail(context)
|
||||
raise Failure, self
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user