replace isBlockedHost with isFederationAllowedHost
This commit is contained in:
@@ -176,7 +176,7 @@ export class ActivityPubServerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const meta = await this.metaService.fetch();
|
const meta = await this.metaService.fetch();
|
||||||
if (this.utilityService.isBlockedHost(meta.blockedHosts, keyHost)) {
|
if (this.utilityService.isFederationAllowedHost(keyHost)) {
|
||||||
/* blocked instance: refuse (we don't care if the signature is
|
/* blocked instance: refuse (we don't care if the signature is
|
||||||
good, if they even pretend to be from a blocked instance,
|
good, if they even pretend to be from a blocked instance,
|
||||||
they're out) */
|
they're out) */
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
notes = notes.filter(note => {
|
notes = notes.filter(note => {
|
||||||
if (note.user?.isSilenced && me && followings && note.userId !== me.id && !followings[note.userId]) return false;
|
if (note.user?.isSilenced && me && followings && note.userId !== me.id && !followings[note.userId]) return false;
|
||||||
if (note.user?.isSuspended) return false;
|
if (note.user?.isSuspended) return false;
|
||||||
if (this.utilityService.isBlockedHost(meta.blockedHosts, note.userHost)) return false;
|
if (this.utilityService.isFederationAllowedHost(note.userHost)) return false;
|
||||||
if (this.utilityService.isSilencedHost(meta.silencedHosts, note.userHost)) return false;
|
if (this.utilityService.isSilencedHost(meta.silencedHosts, note.userHost)) return false;
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user