Adding sensible federation default for third party clients

Fixes #48.
This commit is contained in:
Darius Kazemi 2020-05-16 13:43:05 -07:00
parent 24934e5fdd
commit 8b75cc93f1
1 changed files with 9 additions and 2 deletions

View File

@ -88,8 +88,15 @@ class PostStatusService < BaseService
end end
def local_only_option(local_only, in_reply_to, federation_setting) def local_only_option(local_only, in_reply_to, federation_setting)
return in_reply_to&.local_only? if local_only.nil? # XXX temporary, just until clients implement to avoid leaking local_only posts if local_only.nil?
return federation_setting if local_only.nil? if in_reply_to&.local_only?
return true
end
if !in_reply_to&.local_only?
return false
end
return !federation_setting
end
local_only local_only
end end