summaryrefslogtreecommitdiff
path: root/testrig/testmodels.go
diff options
context:
space:
mode:
authorLibravatar Adelie Paull <1208865+i-am-a-paull@users.noreply.github.com>2022-05-02 09:23:37 -0400
committerLibravatar GitHub <noreply@github.com>2022-05-02 15:23:37 +0200
commit9265a09a656196e2a94c73e32c7b79399411a79e (patch)
tree6cda0aa926f02409f3c3cb4f00c5ef7634b44b53 /testrig/testmodels.go
parent[chore] Update all but bun libraries (#526) (diff)
downloadgotosocial-9265a09a656196e2a94c73e32c7b79399411a79e.tar.xz
[bugfix] Allow self-boosting for any visibility but direct (#510)
* create visibility filter for boostability and allow self-boosting for any visbility but direct messages * add a followers-only status to local_account_2 * fix typo in comment * add license header, unwrap errors, be explicit about non-boostable visibility settings to avoid rogue boosting from miscoded clients, use ID compare for checking if self-boosting * add tests for statusboostable filter * fix tests that were affected by adding a new status to the test data * fix the rest of tests affected by adding a status to the textrig data
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r--testrig/testmodels.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index 949bfa7bf..cc32aa39e 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -1263,6 +1263,30 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Likeable: true,
ActivityStreamsType: ap.ObjectNote,
},
+ "local_account_2_status_7": {
+ ID: "01G20ZM733MGN8J344T4ZDDFY1",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01G20ZM733MGN8J344T4ZDDFY1",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01G20ZM733MGN8J344T4ZDDFY1",
+ Content: "🐢 hi followers! did u know i'm a turtle? 🐢",
+ AttachmentIDs: []string{},
+ CreatedAt: time.Now().Add(-1 * time.Minute),
+ UpdatedAt: time.Now().Add(-1 * time.Minute),
+ Local: true,
+ AccountURI: "http://localhost:8080/users/1happyturtle",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ InReplyToID: "",
+ BoostOfID: "",
+ ContentWarning: "",
+ Visibility: gtsmodel.VisibilityFollowersOnly,
+ Sensitive: false,
+ Language: "en",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
+ Federated: true,
+ Boostable: true,
+ Replyable: true,
+ Likeable: true,
+ ActivityStreamsType: ap.ObjectNote,
+ },
"remote_account_1_status_1": {
ID: "01FVW7JHQFSFK166WWKR8CBA6M",
URI: "http://fossbros-anonymous.io/users/foss_satan/statuses/01FVW7JHQFSFK166WWKR8CBA6M",