backend: implement not forwarding block activities #212

Merged
norm merged 12 commits from non-federating-blocks into main 2022-11-17 21:24:40 +00:00
Contributor

Fixes #211

Commits pulled from https://github.com/misskey-dev/misskey/pull/7799

Todo:

  • Make Block sending opt-in, not opt-out. Changed back to federating blocks by default.

Changelog: Added

Fixes https://akkoma.dev/FoundKeyGang/FoundKey/issues/211 Commits pulled from https://github.com/misskey-dev/misskey/pull/7799 Todo: - [x] ~~Make Block sending opt-in, not opt-out.~~ Changed back to federating blocks by default. Changelog: Added
norm changed title from backend: implement not forwarding block activities to WIP: backend: implement not forwarding block activities 2022-10-21 21:24:56 +00:00
norm force-pushed non-federating-blocks from cce6973326
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
to e6a13c177d
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
2022-10-21 21:52:43 +00:00
Compare
norm changed title from WIP: backend: implement not forwarding block activities to backend: implement not forwarding block activities 2022-10-22 16:35:55 +00:00
Author
Contributor

I suggest squashing this PR when merging, with Co-authored-by trailers of course.

I suggest squashing this PR when merging, with `Co-authored-by` trailers of course.
Owner
  1. Do we send a reject follow in place of a block? Otherwise remote users will keep being able to read private statuses.
  2. Can we make the default enabled?

I know the spec says "SHOULD NOT" but that's fairly permissive, and there are many good reasons to send them out (that have been discussed previously in IRC).
Otherwise this is fine imo - letting users pick is all well and good, it just should be on by default for people that do not care (rather than off, which leads to some fairly bad scenarios).

1. Do we send a reject follow in place of a block? Otherwise remote users will keep being able to read private statuses. 2. Can we make the default enabled? I know the spec says "SHOULD NOT" but that's fairly permissive, and there are many good reasons to send them out (that have been discussed previously in IRC). Otherwise this is fine imo - letting users pick is all well and good, it just should be on by default for people that do not care (rather than off, which leads to some fairly bad scenarios).
norm force-pushed non-federating-blocks from 2a42a41147
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
to 30a192bdf1
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/push/test Pipeline failed
2022-11-09 19:22:02 +00:00
Compare
norm force-pushed non-federating-blocks from 30a192bdf1
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/push/test Pipeline failed
to b4a83bea38
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
2022-11-09 19:23:17 +00:00
Compare
send reject follow if federateBlocks is false
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
9c9b5bb44c
Author
Contributor

Ok, I should have those concerns addressed.

Ok, I should have those concerns addressed.
@ -0,0 +1,14 @@
import {MigrationInterface, QueryRunner} from "typeorm";
Owner

I think this migration should be adapted to how the other migrations look. I.e. plain javascript, therefore no need for this import.

There should be no type annotations and the file extension should be .js.

I think this migration should be adapted to how the other migrations look. I.e. plain javascript, therefore no need for this import. There should be no type annotations and the file extension should be `.js`.
norm marked this conversation as resolved
make migration plain JS
Some checks failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
a499c364d6
Revert "send reject follow if federateBlocks is false"
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
6793d6accf
This reverts commit 9c9b5bb44c.
translate comments and add return types
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
00bc255508
@ -28,3 +28,3 @@
// deliver if remote bloking
if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee)) {
if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee) && blocker.federateBlocks) {
Owner

This could lead to problems if the block was federated but the user later decides blocks should not be federated and then the unblock is not federated.

Since I think unblocks must signify some level of trust it should always be okay to federate them. Or otherwise, whether the block was federated or not should be stored in the database.

This could lead to problems if the block was federated but the user later decides blocks should not be federated and then the unblock is not federated. Since I think unblocks must signify some level of trust it should always be okay to federate them. Or otherwise, whether the block was federated or not should be stored in the database.
norm marked this conversation as resolved
remove federateBlocks check for unblock activities
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
0e9ac8d929
@ -335,6 +335,7 @@ export const UserRepository = db.getRepository(User).extend({
isLocked: user.isLocked,
isSilenced: user.isSilenced || falsy,
isSuspended: user.isSuspended || falsy,
federateBlocks: user!.federateBlocks,
Owner

I think it might be a better idea to move this to the opts.detail && isMe part further down. I.e. not show this publicly since we've also stopped showing blocked instances publicly.

I think it might be a better idea to move this to the `opts.detail && isMe` part further down. I.e. not show this publicly since we've also stopped showing blocked instances publicly.
norm marked this conversation as resolved
norm force-pushed non-federating-blocks from 16c9647597
Some checks failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
to 557885a720
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
2022-11-16 22:25:30 +00:00
Compare
norm force-pushed non-federating-blocks from 557885a720
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
to 667d791c85
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
2022-11-16 22:29:32 +00:00
Compare
Johann150 approved these changes 2022-11-17 20:06:35 +00:00
norm merged commit 71b3b5a60c into main 2022-11-17 21:24:40 +00:00
norm deleted branch non-federating-blocks 2022-11-17 21:24:41 +00:00
Sign in to join this conversation.
No reviewers
No labels
feature
fix
upkeep
No milestone
No project
No assignees
3 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
FoundKeyGang/FoundKey!212
No description provided.