]> cat aescling's git repositories - mastodon.git/commitdiff
set local_only flag on statuses in post_status_service
authorErin <sylphofelectricity@gmail.com>
Sun, 10 Dec 2017 23:04:32 +0000 (17:04 -0600)
committerErin <sylphofelectricity@gmail.com>
Sun, 10 Dec 2017 23:04:32 +0000 (17:04 -0600)
app/services/post_status_service.rb

index 59531a76ce318e78102170aae8d4536af8021214..e531384c820e322ffde156086fed1b99934c6408 100644 (file)
@@ -40,8 +40,9 @@ class PostStatusService < BaseService
     LinkCrawlWorker.perform_async(status.id) unless status.spoiler_text?
     DistributionWorker.perform_async(status.id)
 
-    # match both with and without U+FE0F (the emoji variation selector)
-    unless /👁\ufe0f?\z/.match?(status.content)
+    status.local_only = status.marked_local_only?
+
+    unless status.local_only
       Pubsubhubbub::DistributionWorker.perform_async(status.stream_entry.id)
       ActivityPub::DistributionWorker.perform_async(status.id)
       ActivityPub::ReplyDistributionWorker.perform_async(status.id) if status.reply? && status.thread.account.local?