Add syndication commands
This commit is contained in:
15
app/commands/posts/syndicate.rb
Normal file
15
app/commands/posts/syndicate.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Adamantium
|
||||
module Commands
|
||||
module Posts
|
||||
class Syndicate
|
||||
include Deps["settings", "syndication.mastodon"]
|
||||
|
||||
def call(post)
|
||||
if post.syndicate_to.include settings.mastodon_server
|
||||
mastodon.call(post: post)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user