Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/models/abuse_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ def creator_ids
end
end

# ID of the reported work, unless the report is about comment(s) on the work
# ID of the reported work, unless the report is about comment(s) or bookmark(s) on the work
def reported_work_id
comments = url[%r{/comments/}, 0]
url[%r{/works/(\d+)}, 1] if comments.nil?
bookmarks = url[%r{/bookmarks}, 0]
url[%r{/works/(\d+)}, 1] if comments.nil? && bookmarks.nil?
end

# ID of the reported comment
Expand Down
Loading