about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-02-02 08:39:52 -0600
committerDavid Yip <yipdw@member.fsf.org>2018-02-02 08:39:52 -0600
commit4c1fd9a19c779fa6e7d74513c61f37ce05a841b3 (patch)
tree0cf23810e2f7ff0f45c65a3f2f9b35016587c68a /app/lib
parentad3a2dfb66abc01a90807f23191b7e28c3c242ed (diff)
parent33f56811e38bc330de9dcfa6794c29a176a30311 (diff)
Merge remote-tracking branch 'tootsuite/master' into merge-upstream
Conflicts:
      app/javascript/styles/mastodon/components.scss
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/announce.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/announce.rb b/app/lib/activitypub/activity/announce.rb
index abf2b9b80..c8a358195 100644
--- a/app/lib/activitypub/activity/announce.rb
+++ b/app/lib/activitypub/activity/announce.rb
@@ -15,7 +15,8 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
       account: @account,
       reblog: original_status,
       uri: @json['id'],
-      created_at: @options[:override_timestamps] ? nil : @json['published']
+      created_at: @options[:override_timestamps] ? nil : @json['published'],
+      visibility: original_status.visibility
     )
 
     distribute(status)
@@ -35,6 +36,6 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
   end
 
   def announceable?(status)
-    status.public_visibility? || status.unlisted_visibility?
+    status.account_id == @account.id || status.public_visibility? || status.unlisted_visibility?
   end
 end