Files
adamantium/slices/micropub/queries/posts/syndication_url_to_source.rb
2024-07-23 19:36:56 +10:00

22 lines
434 B
Ruby

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/)
:gist
end
end
end
end
end
end