Revert "send reject follow if federateBlocks is false"

This reverts commit 9c9b5bb44c.
This commit is contained in:
Norm 2022-11-12 14:15:07 -05:00
parent a499c364d6
commit 6793d6accf
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -11,7 +11,6 @@ import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLis
import { perUserFollowingChart } from '@/services/chart/index.js'; import { perUserFollowingChart } from '@/services/chart/index.js';
import { genId } from '@/misc/gen-id.js'; import { genId } from '@/misc/gen-id.js';
import { getActiveWebhooks } from '@/misc/webhook-cache.js'; import { getActiveWebhooks } from '@/misc/webhook-cache.js';
import { rejectFollow } from '../following/reject.js';
export default async function(blocker: User, blockee: User) { export default async function(blocker: User, blockee: User) {
await Promise.all([ await Promise.all([
@ -33,14 +32,9 @@ export default async function(blocker: User, blockee: User) {
await Blockings.insert(blocking); await Blockings.insert(blocking);
if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee)) { if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee) && blocker.federateBlocks) {
if (blocker.federateBlocks) { const content = renderActivity(renderBlock(blocking));
const content = renderActivity(renderBlock(blocking)); deliver(blocker, content, blockee.inbox);
deliver(blocker, content, blockee.inbox);
} else {
// Send a Reject Follow activity to the user being blocked to prevent them from reading follower-only posts.
rejectFollow(blocker, blockee);
}
} }
} }