diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-25 19:19:52 -0700 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-25 19:19:52 -0700 |
commit | b323e00bf38f490b6011505df2ff2b4db6b17421 (patch) | |
tree | f489b788e67160e985e36c223bddcb19ff607783 /app/services | |
parent | a520b118e4653aa35a74eba6e1662dfc98fcd1cc (diff) | |
parent | 93fc8aa14c914d03643197306c325becbaed2581 (diff) |
Merge branch 'master' of https://github.com/glitch-soc/mastodon
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 5 | ||||
-rw-r--r-- | app/services/reblog_service.rb | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 2e6fbb5c3..d86ae04d4 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -36,7 +36,10 @@ class PostStatusService < BaseService LinkCrawlWorker.perform_async(status.id) unless status.spoiler_text? DistributionWorker.perform_async(status.id) - Pubsubhubbub::DistributionWorker.perform_async(status.stream_entry.id) + + unless /👁$/.match?(status.content) + Pubsubhubbub::DistributionWorker.perform_async(status.stream_entry.id) + end if options[:idempotency].present? redis.setex("idempotency:status:#{account.id}:#{options[:idempotency]}", 3_600, status.id) diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index ba24b1f9d..497cdb4f5 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -20,7 +20,10 @@ class ReblogService < BaseService reblog = account.statuses.create!(reblog: reblogged_status, text: '') DistributionWorker.perform_async(reblog.id) - Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id) + unless /👁$/.match?(reblogged_status.content) + Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id) + end + if reblogged_status.local? NotifyService.new.call(reblog.reblog.account, reblog) |