Skip to content

Commit

Permalink
fix panic without -blocklist (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Mar 10, 2024
1 parent 1cbd963 commit 31083c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inbox/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (q *Queue) processCreateActivity(ctx context.Context, log *slog.Logger, sen
return fmt.Errorf("received invalid post ID: %s", post.ID)
}

if q.BlockList.Contains(u.Host) {
if q.BlockList != nil && q.BlockList.Contains(u.Host) {
return fmt.Errorf("ignoring post %s: %w", post.ID, fed.ErrBlockedDomain)
}

Expand Down

0 comments on commit 31083c3

Please sign in to comment.