mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-29 09:03:43 +01:00
Rubocop fixes
This commit is contained in:
parent
8c64325cc6
commit
0cf94443bd
7 changed files with 25 additions and 23 deletions
|
@ -222,6 +222,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
account = account_from_uri(tag['href'])
|
||||
begin
|
||||
return unless account || DeliveryFailureTracker.available?(tag['href'])
|
||||
|
||||
account = ActivityPub::FetchRemoteAccountService.new.call(tag['href'], request_id: @options[:request_id]) if account.nil?
|
||||
rescue HTTP::ConnectionError => e
|
||||
Rails.logger.info "Fetching account #{tag['href']} failed: #{e}"
|
||||
|
|
|
@ -10,7 +10,7 @@ class ActivityPub::Activity::EmojiReact < ActivityPub::Activity
|
|||
@account.reacted?(original_status, name)
|
||||
|
||||
custom_emoji = nil
|
||||
if name =~ /^:.*:$/
|
||||
if /^:.*:$/.match?(name)
|
||||
process_emoji_tags(@json['tag'])
|
||||
|
||||
name.delete! ':'
|
||||
|
|
|
@ -22,7 +22,7 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
|
|||
return false if name.nil?
|
||||
|
||||
custom_emoji = nil
|
||||
if name =~ /^:.*:$/
|
||||
if /^:.*:$/.match?(name)
|
||||
process_emoji_tags(@json['tag'])
|
||||
|
||||
name.delete! ':'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: status_reactions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Fabricator(:status_reaction) do
|
||||
account nil
|
||||
status nil
|
||||
name "MyString"
|
||||
name 'MyString'
|
||||
custom_emoji nil
|
||||
end
|
Loading…
Reference in a new issue