mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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:
@ -147,7 +147,27 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() {
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null,
|
||||
"text": "hello everyone!"
|
||||
"text": "hello everyone!",
|
||||
"interaction_policy": {
|
||||
"can_favourite": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
},
|
||||
"can_reply": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
},
|
||||
"can_reblog": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
}
|
||||
}
|
||||
}`, muted)
|
||||
|
||||
// Unmute the status, ensure `muted` is `false`.
|
||||
@ -212,7 +232,27 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() {
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null,
|
||||
"text": "hello everyone!"
|
||||
"text": "hello everyone!",
|
||||
"interaction_policy": {
|
||||
"can_favourite": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
},
|
||||
"can_reply": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
},
|
||||
"can_reblog": {
|
||||
"always": [
|
||||
"public"
|
||||
],
|
||||
"with_approval": []
|
||||
}
|
||||
}
|
||||
}`, unmuted)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user