mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Text duplication fix (#137)
* start testing text duplication * tests * fixes + tests
This commit is contained in:
@@ -937,6 +937,31 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
},
|
||||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_1_status_5": {
|
||||
ID: "01FCTA44PW9H1TB328S9AQXKDS",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/01FCTA44PW9H1TB328S9AQXKDS",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/01FCTA44PW9H1TB328S9AQXKDS",
|
||||
Content: "hi!",
|
||||
Attachments: []string{},
|
||||
CreatedAt: time.Now().Add(-1 * time.Minute),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Minute),
|
||||
Local: true,
|
||||
AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityMutualsOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
Boostable: true,
|
||||
Replyable: true,
|
||||
Likeable: true,
|
||||
},
|
||||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_2_status_1": {
|
||||
ID: "01F8MHBQCBTDKN6X5VHGMMN4MA",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",
|
||||
@@ -1076,6 +1101,35 @@ func NewTestTags() map[string]*gtsmodel.Tag {
|
||||
Listable: true,
|
||||
LastStatusAt: time.Now().Add(-71 * time.Hour),
|
||||
},
|
||||
"Hashtag": {
|
||||
ID: "01FCT9SGYA71487N8D0S1M638G",
|
||||
URL: "http://localhost:8080/tags/Hashtag",
|
||||
Name: "Hashtag",
|
||||
FirstSeenFromAccountID: "",
|
||||
CreatedAt: time.Now().Add(-71 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-71 * time.Hour),
|
||||
Useable: true,
|
||||
Listable: true,
|
||||
LastStatusAt: time.Now().Add(-71 * time.Hour),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewTestMentions returns a map of gts model mentions keyed by their name.
|
||||
func NewTestMentions() map[string]*gtsmodel.Mention {
|
||||
return map[string]*gtsmodel.Mention{
|
||||
"zork_mention_foss_satan": {
|
||||
ID: "01FCTA2Y6FGHXQA4ZE6N5NMNEX",
|
||||
StatusID: "01FCTA44PW9H1TB328S9AQXKDS",
|
||||
CreatedAt: time.Now().Add(-1 * time.Minute),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Minute),
|
||||
OriginAccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
|
||||
OriginAccountURI: "http://localhost:8080/users/the_mighty_zork",
|
||||
TargetAccountID: "01F8MH5ZK5VRH73AKHQM6Y9VNX",
|
||||
NameString: "@foss_satan@fossbros-anonymous.io",
|
||||
MentionedAccountURI: "http://fossbros-anonymous.io/users/foss_satan",
|
||||
MentionedAccountURL: "http://fossbros-anonymous.io/@foss_satan",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user