-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Set, receive, and enforce interaction policies for likes, replies, and boosts of statuses #3101
Conversation
@@ -199,6 +195,10 @@ var Start action.GTSAction = func(ctx context.Context) error { | |||
|
|||
processor := testrig.NewTestProcessor(state, federator, emailSender, mediaManager) | |||
|
|||
// Initialize workers. | |||
testrig.StartWorkers(state, processor.Workers()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this from a noop worker because it's useful on the testrig to have side-effects be processed.
internal/web/profile.go
Outdated
return | ||
} | ||
|
||
b, err := json.Marshal(user) | ||
if err != nil { | ||
err := gtserror.Newf("could not marshal json: %w", err) | ||
apiutil.WebErrorHandler(c, gtserror.NewErrorInternalError(err), m.processor.InstanceGetV1) | ||
apiutil.WebErrorHandler(c, gtserror.NewErrorInternalError(err), instanceGet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a silly fix for something I noticed while I was in this package. I can move it to another PR if desired.
is it possible to separate this into maybe a few more parts? e.g. separating out the frontend API routes, the filter parts etc? |
Yes probably! I'll have a crack at splitting it into smaller chunks. |
f0c03ba
to
4dd6174
Compare
4dd6174
to
d50494a
Compare
d38c725
to
4d93796
Compare
Gonna open this as a series of smaller PRs, hang tight. |
Description
This pull request implements per-status interaction policy settings, as well as per-visibility default policies for accounts, using the gtsmodels merged in #3075 and the changes to our activity library in #3074.
Work-in-progress documentation for how the policies work on a protocol level can be viewed here: https://github.com/superseriousbusiness/gotosocial/blob/interaction_policy/docs/federation/posts.md#interaction-policy
Sub-tasks:
AP API
Client API
Processing / other
filter
package and use it to check permissionsSettings panel
Documentation
Closes #3057
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.