[feature] Allow users to set default interaction policies per status visibility (#3108)

* [feature] Allow users to set default interaction policies

* use vars for default policies

* avoid some code repetition

* unfuck form binding

* avoid bonkers loop

* beep boop

* put policyValsToAPIPolicyVals in separate function

* don't bother with slices.Grow

* oops
This commit is contained in:
tobi
2024-07-17 16:46:52 +02:00
committed by GitHub
parent 401098191b
commit 0aadc2db2a
36 changed files with 3178 additions and 316 deletions

View File

@ -528,7 +528,27 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"tags": [],
"emojis": [],
"card": null,
"poll": null
"poll": null,
"interaction_policy": {
"can_favourite": {
"always": [
"public"
],
"with_approval": []
},
"can_reply": {
"always": [
"public"
],
"with_approval": []
},
"can_reblog": {
"always": [
"public"
],
"with_approval": []
}
}
}
],
"rules": [
@ -750,7 +770,27 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() {
"tags": [],
"emojis": [],
"card": null,
"poll": null
"poll": null,
"interaction_policy": {
"can_favourite": {
"always": [
"public"
],
"with_approval": []
},
"can_reply": {
"always": [
"public"
],
"with_approval": []
},
"can_reblog": {
"always": [
"public"
],
"with_approval": []
}
}
}
],
"rules": [
@ -972,7 +1012,27 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() {
"tags": [],
"emojis": [],
"card": null,
"poll": null
"poll": null,
"interaction_policy": {
"can_favourite": {
"always": [
"public"
],
"with_approval": []
},
"can_reply": {
"always": [
"public"
],
"with_approval": []
},
"can_reblog": {
"always": [
"public"
],
"with_approval": []
}
}
}
],
"rules": [