Fix reply mentions

This commit is contained in:
2024-03-22 18:50:43 +11:00
parent 13a8629de0
commit 648daf66f2
2 changed files with 8 additions and 7 deletions

View File

@@ -11,19 +11,20 @@ module Adamantium
source = post_url
links = link_finder.call(post_content)
links.each do |target|
HTTParty.post(settings.webmention_url, {
HTTParty.post(URI(settings.webmention_url), {
token: settings.webmention_token,
source: source,
target: target
target: target.to_s
})
end
links = link_finder.call(in_reply_to)
links.each do |target|
HTTParty.post(settings.webmention_url, {
links.map do |target|
puts [target.to_s, source]
HTTParty.post(URI(settings.webmention_url), {
token: settings.webmention_token,
source: source,
target: target
target: target.to_s
})
end
end