mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
make "media silenced" work like "silenced"
that is, silencing `foo.com` also silences `sub.foo.com`
This commit is contained in:
parent
02748edd17
commit
151470d882
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ export class UtilityService {
|
|||
@bindThis
|
||||
public isMediaSilencedHost(silencedHosts: string[] | undefined, host: string | null): boolean {
|
||||
if (!silencedHosts || host == null) return false;
|
||||
return silencedHosts.some(x => host.toLowerCase() === x);
|
||||
return silencedHosts.some(x => `.${host.toLowerCase()}`.endsWith(`.${x}`));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
Loading…
Reference in a new issue