Add replies to posts
This commit is contained in:
@@ -4,7 +4,7 @@ require "que"
|
||||
module Adamantium
|
||||
module Jobs
|
||||
class SendWebMentions < Que::Job
|
||||
def run(post_content:, post_url:)
|
||||
def run(post_content:, post_url:, in_reply_to:)
|
||||
link_finder = Admin::Container["post_utilities.link_finder"]
|
||||
settings = Admin::Container["settings"]
|
||||
|
||||
@@ -17,6 +17,15 @@ module Adamantium
|
||||
target: target
|
||||
})
|
||||
end
|
||||
|
||||
links = link_finder.call(in_reply_to)
|
||||
links.each do |target|
|
||||
HTTParty.post(settings.webmention_url, {
|
||||
token: settings.webmention_token,
|
||||
source: source,
|
||||
target: target
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -9,6 +9,7 @@ module Adamantium
|
||||
youtube.com
|
||||
bsky.app
|
||||
bsky.social
|
||||
localhost
|
||||
github.com].freeze
|
||||
|
||||
def call(content)
|
||||
|
Reference in New Issue
Block a user