0
0
Fork 0

Fix ThreadResolveWorker getting queued with invalid URLs (#9628)

This commit is contained in:
Eugen Rochko 2018-12-26 19:15:53 +01:00 committed by GitHub
parent 17cd91c777
commit aa9a20cde0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -57,7 +57,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
save_emojis(status)
end
if thread? && status.thread.nil?
if thread? && status.thread.nil? && Request.valid_url?(thread.second)
Rails.logger.debug "Trying to attach #{status.id} (#{id}) to #{thread.first}"
ThreadResolveWorker.perform_async(status.id, thread.second)
end