Implement instance blocklist #85

Merged
dessalines merged 1 commits from instance-blocklist into main 2020-08-13 20:26:53 +00:00
Owner

Federation tests are passing, and blocklist seems to work fine during manual testing.

Federation tests are passing, and blocklist seems to work fine during manual testing.
dessalines reviewed 2020-08-13 20:25:56 +00:00
@ -101,2 +98,3 @@
Err(anyhow!("{} not in federation allowlist", domain).into())
}
None => Err(anyhow!("federation allowlist is empty").into()),
} else if !blocked_instances.is_empty() {
Owner

I suppose we only have 3 scenarios, so an else if is okay here.

  • Empty allowlist, empty blocklist. IE full federation.
  • Full allowlist, empty blocklist. Explicit allows.
  • Empty allowlist, full blocklist. Explicit blocks.
I suppose we only have 3 scenarios, so an else if is okay here. - Empty allowlist, empty blocklist. IE full federation. - Full allowlist, empty blocklist. Explicit allows. - Empty allowlist, full blocklist. Explicit blocks.
Author
Owner

Ah I'm not handling the case of empty allowlist and empty blocklist.

Ah I'm not handling the case of empty allowlist and empty blocklist.
dessalines merged commit 164a9c29fe into main 2020-08-13 20:26:53 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#85
No description provided.