Skip to content

Commit

Permalink
重複処理を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Oct 11, 2023
1 parent 285dc3f commit 9fffc59
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions app/services/emoji_react_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def call(account, status, name)
notify_to_followers(emoji_reaction)
bump_potential_friendship(account, status)
write_stream(emoji_reaction)
forward_for_emoji_reaction!(emoji_reaction)
relay_for_emoji_reaction!(emoji_reaction)
relay_friend_for_emoji_reaction!(emoji_reaction)

Expand Down Expand Up @@ -91,12 +90,6 @@ def render_emoji_reaction(emoji_group)
@render_emoji_reaction ||= Oj.dump(event: :emoji_reaction, payload: emoji_group.to_json)
end

def forward_for_emoji_reaction!(emoji_reaction)
return unless @status.local?

ActivityPub::RawDistributionWorker.perform_async(build_json(emoji_reaction), @status.account.id, [@status.account.preferred_inbox_url])
end

def relay_for_emoji_reaction!(emoji_reaction)
return unless @status.local? && @status.public_visibility?

Expand Down
7 changes: 0 additions & 7 deletions app/services/un_emoji_react_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def call(account_id, status_id, emoji_reaction = nil)
notify_to_followers(emoji_reaction) if @status.account.local?
write_stream(emoji_reaction)

forward_for_undo_emoji_reaction!(emoji_reaction)
relay_for_undo_emoji_reaction!(emoji_reaction)
relay_friend_for_undo_emoji_reaction!(emoji_reaction)
else
Expand Down Expand Up @@ -64,12 +63,6 @@ def render_emoji_reaction(emoji_group)
Oj.dump(event: :emoji_reaction, payload: emoji_group.to_json)
end

def forward_for_undo_emoji_reaction!(emoji_reaction)
return unless @status.local?

ActivityPub::RawDistributionWorker.perform_async(build_json(emoji_reaction), @status.account.id, [@status.account.preferred_inbox_url])
end

def relay_for_undo_emoji_reaction!(emoji_reaction)
return unless @status.local? && @status.public_visibility?

Expand Down

0 comments on commit 9fffc59

Please sign in to comment.