Support "Public" audience identifier
This commit is contained in:
parent
5064afd766
commit
7b8a56dd8f
2 changed files with 6 additions and 2 deletions
|
@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Added `/api/v1/settings/import_follows` API endpoint.
|
||||
- Validation of Monero subscription payout address.
|
||||
- Accept webfinger requests where `resource` is actor ID.
|
||||
- Adeed support for `as:Public` audience identifier.
|
||||
- Adeed support for `as:Public` and `Public` audience identifiers.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -105,7 +105,11 @@ fn get_note_visibility(
|
|||
) -> Visibility {
|
||||
let audience = [primary_audience, secondary_audience].concat();
|
||||
// Some servers (e.g. Takahe) use "as" namespace
|
||||
const PUBLIC_VARIANTS: [&str; 2] = [AP_PUBLIC, "as:Public"];
|
||||
const PUBLIC_VARIANTS: [&str; 3] = [
|
||||
AP_PUBLIC,
|
||||
"as:Public",
|
||||
"Public",
|
||||
];
|
||||
if audience.iter().any(|item| PUBLIC_VARIANTS.contains(&item.as_str())) {
|
||||
return Visibility::Public;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue