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

View File

@@ -21,9 +21,9 @@ article class="h-entry"
div class=""
em = "In reply to: "
- if reply_in_context
a class="no-underline bg-pink-50 hover:bg-pink-100 dark:bg-pink-600 hover:dark:bg-pink-900 p-1 rounded" href=post.in_reply_to #{reply_in_context.display_title}
a class="u-in-reply-to no-underline bg-pink-50 hover:bg-pink-100 dark:bg-pink-600 hover:dark:bg-pink-900 p-1 rounded" href=post.in_reply_to #{reply_in_context.display_title}
- else
a class="no-underline bg-pink-50 hover:bg-pink-100 dark:bg-pink-600 hover:dark:bg-pink-900 p-1 rounded" href=post.in_reply_to #{post.in_reply_to}
a class="u-in-reply-to no-underline bg-pink-50 hover:bg-pink-100 dark:bg-pink-600 hover:dark:bg-pink-900 p-1 rounded" href=post.in_reply_to #{post.in_reply_to}
nav class="space-x-1 text-sm md:text-sm md:block dark:text-gray-600"
- if post.location || post.photos? || post.videos?
span See more: