diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-19 18:50:24 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:43:59 -0500 |
commit | 21438b54bdaf3c557ec9ebbc482a2c418d8c64f8 (patch) | |
tree | e577d047af196823227e675dea52b2fc2fa842c6 /app/serializers/activitypub | |
parent | 8c8ad0ac0ed0d3e67f3e521068b59edd4054f1e9 (diff) |
[Feature] Add manual publishing option
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 431a0faa4..87d7f9db0 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -33,6 +33,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer def id raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? && !instance_options[:allow_local_only] + raise Mastodon::NotPermittedError, 'Unpublished statuses should not be serialized' unless object.published? || instance_options[:allow_local_only] ActivityPub::TagManager.instance.uri_for(object) end |