summaryrefslogtreecommitdiff
path: root/testrig/testmodels.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-11-22 14:40:23 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-22 14:40:23 +0100
commit79ccd8fd8acd09f78385cda799e9049cbc59de0f (patch)
tree6f2645b00f65fe4c4f807d1ccc0994738d4719cc /testrig/testmodels.go
parentFix incorrect target being used in CC prop for mentioning statuses (#322) (diff)
downloadgotosocial-79ccd8fd8acd09f78385cda799e9049cbc59de0f.tar.xz
Fix mentioned accounts visibility bug (#323)
* update other tests * set test status to followers_only * add test dm * fix mentioned accounts not being added to relevantAccounts * add some visibility tests for statuses
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r--testrig/testmodels.go40
1 files changed, 39 insertions, 1 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index fc0047f20..5d7df1c77 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -1037,7 +1037,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
InReplyToID: "",
BoostOfID: "",
ContentWarning: "",
- Visibility: gtsmodel.VisibilityMutualsOnly,
+ Visibility: gtsmodel.VisibilityFollowersOnly,
Sensitive: false,
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
@@ -1166,6 +1166,32 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Likeable: true,
ActivityStreamsType: ap.ObjectNote,
},
+ "local_account_2_status_6": {
+ ID: "01FN3VJGFH10KR7S2PB0GFJZYG",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01FN3VJGFH10KR7S2PB0GFJZYG",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01FN3VJGFH10KR7S2PB0GFJZYG",
+ Content: "🐢 @the_mighty_zork hi zork, this is a direct message, shhhhhh! 🐢",
+ CreatedAt: time.Now().Add(-1 * time.Minute),
+ UpdatedAt: time.Now().Add(-1 * time.Minute),
+ Local: true,
+ AccountURI: "http://localhost:8080/users/1happyturtle",
+ MentionIDs: []string{"01FDF2HM2NF6FSRZCDEDV451CN"},
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ InReplyToID: "",
+ InReplyToAccountID: "",
+ InReplyToURI: "",
+ BoostOfID: "",
+ ContentWarning: "",
+ Visibility: gtsmodel.VisibilityDirect,
+ Sensitive: false,
+ Language: "en",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
+ Federated: true,
+ Boostable: true,
+ Replyable: true,
+ Likeable: true,
+ ActivityStreamsType: ap.ObjectNote,
+ },
}
}
@@ -1224,6 +1250,18 @@ func NewTestMentions() map[string]*gtsmodel.Mention {
TargetAccountURI: "http://localhost:8080/users/the_mighty_zork",
TargetAccountURL: "http://localhost:8080/@the_mighty_zork",
},
+ "local_user_2_mention_zork_direct_message": {
+ ID: "01FN3VKDEF4CN2W9TKX339BEHB",
+ StatusID: "01FN3VJGFH10KR7S2PB0GFJZYG",
+ CreatedAt: time.Now().Add(-1 * time.Minute),
+ UpdatedAt: time.Now().Add(-1 * time.Minute),
+ OriginAccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ OriginAccountURI: "http://localhost:8080/users/1happyturtle",
+ TargetAccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
+ NameString: "@the_mighty_zork",
+ TargetAccountURI: "http://localhost:8080/users/the_mighty_zork",
+ TargetAccountURL: "http://localhost:8080/@the_mighty_zork",
+ },
"admin_account_mention_zork": {
ID: "01FF26A6BGEKCZFWNEHXB2ZZ6M",
StatusID: "01FF25D5Q0DH7CHD57CTRS6WK0",