Skip to content

Commit

Permalink
Revert "Fix handling of ActivityPub activities lacking some attributes (
Browse files Browse the repository at this point in the history
mastodon#8864)"

This reverts commit c2f31d9.
  • Loading branch information
lindwurm committed Nov 1, 2018
1 parent 9fcd9b3 commit c68b915
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/accept.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def accept_follow_for_relay
end

def relay
@relay ||= Relay.find_by(follow_activity_id: object_uri) unless object_uri.nil?
@relay ||= Relay.find_by(follow_activity_id: object_uri)
end

def relay_follow?
Expand Down
2 changes: 0 additions & 2 deletions app/lib/activitypub/activity/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ def delete_person
end

def delete_note
return if object_uri.nil?

@status = Status.find_by(uri: object_uri, account: @account)
@status ||= Status.find_by(uri: @object['atomUri'], account: @account) if @object.is_a?(Hash) && @object['atomUri'].present?

Expand Down
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/reject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def reject_follow_for_relay
end

def relay
@relay ||= Relay.find_by(follow_activity_id: object_uri) unless object_uri.nil?
@relay ||= Relay.find_by(follow_activity_id: object_uri)
end

def relay_follow?
Expand Down
2 changes: 0 additions & 2 deletions app/lib/activitypub/activity/undo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ def perform
private

def undo_announce
return if object_uri.nil?

status = Status.find_by(uri: object_uri, account: @account)
status ||= Status.find_by(uri: @object['atomUri'], account: @account) if @object.is_a?(Hash) && @object['atomUri'].present?

Expand Down

0 comments on commit c68b915

Please sign in to comment.