Save source name when adding syndication target

This commit is contained in:
2024-05-27 20:50:58 +10:00
parent b894fe93fa
commit f5ba90cc89
3 changed files with 80 additions and 51 deletions

View File

@@ -0,0 +1,21 @@
module Micropub
module Queries
module Posts
class SyndicationUrlToSource
def call(url:)
if url.match("https://social.dnitza.com")
return :mastodon
end
if url.match("https://bsky.social")
return :bluesky
end
if url.match("https://gist.github.com")
return :gist
end
end
end
end
end
end