diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-14 02:41:44 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:18 -0500 |
commit | abfd0c107c8003ba06a118625c49d22df553696f (patch) | |
tree | bb41e6b47b2848233b7830b179a7b2e4df21dd91 /app/services/post_status_service.rb | |
parent | d97a574b07cb60e9c2bdd98ace5049e73ee9b861 (diff) |
[Command Tags] Add #!notify toggle to allow toggling whether or not a post should be locally delivered to timelines/notifications
Diffstat (limited to 'app/services/post_status_service.rb')
-rw-r--r-- | app/services/post_status_service.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 82588d254..c6a983001 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -27,6 +27,7 @@ class PostStatusService < BaseService # @option [Enumerable] :mentions Optional array of Mentions to include # @option [Enumerable] :tags Option array of tag names to include # @option [Boolean] :publish If true, status will be published + # @option [Boolean] :notify If false, status will not be delivered to local timelines or mentions # @return [Status] def call(account, options = {}) @account = account @@ -91,6 +92,8 @@ class PostStatusService < BaseService @status = @account.statuses.create!(status_attributes) end + @status.notify = @options[:notify] if @options[:notify].present? + process_command_tags_service.call(@account, @status) process_hashtags_service.call(@status, nil, @tag_names) process_mentions_service.call(@status, mentions: @mentions, deliver: @options[:publish]) |