Support "like" web mentions

This commit is contained in:
2023-12-21 20:29:45 +11:00
parent 38175e45ff
commit e19b86a4c1
2 changed files with 22 additions and 0 deletions

View File

@@ -18,6 +18,17 @@ module Micropub
reply[:post_id] = post.id
webmentions_repo.create(reply)
res.body = {
result: "Webmention was successful"
}.to_json
res.status = 202
in Success[:like, like]
slug = req.params[:"like-of"].split("/").last
post = post_repo.fetch!(slug)
reply[:post_id] = post.id
webmentions_repo.create(reply)
res.body = {
result: "Webmention was successful"