mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-06 22:29:31 -06:00
some tidying, some favedby, the usual
This commit is contained in:
parent
ddfb9aae65
commit
c92a72fdea
19 changed files with 1550 additions and 353 deletions
|
|
@ -41,6 +41,16 @@ func NewTestTokens() map[string]*oauth.Token {
|
|||
AccessCreateAt: time.Now(),
|
||||
AccessExpiresAt: time.Now().Add(72 * time.Hour),
|
||||
},
|
||||
"local_account_2": {
|
||||
ID: "b04cae99-39b5-4610-a425-dc6b91c78a72",
|
||||
ClientID: "a4f6a2ea-a32b-4600-8853-72fc4ad98a1f",
|
||||
UserID: "d120bd97-866f-4a05-9690-a1294b9934c3",
|
||||
RedirectURI: "http://localhost:8080",
|
||||
Scope: "read write follow push",
|
||||
Access: "PIPINALKNNNFNF98717NAMNAMNFKIJKJ881818KJKJAKJJJA",
|
||||
AccessCreateAt: time.Now(),
|
||||
AccessExpiresAt: time.Now().Add(72 * time.Hour),
|
||||
},
|
||||
}
|
||||
return tokens
|
||||
}
|
||||
|
|
@ -243,184 +253,152 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
|
|||
Username: "localhost:8080",
|
||||
},
|
||||
"unconfirmed_account": {
|
||||
ID: "59e197f5-87cd-4be8-ac7c-09082ccc4b4d",
|
||||
Username: "weed_lord420",
|
||||
AvatarFileName: "",
|
||||
AvatarContentType: "",
|
||||
AvatarFileSize: 0,
|
||||
AvatarUpdatedAt: time.Time{},
|
||||
AvatarRemoteURL: "",
|
||||
HeaderFileName: "",
|
||||
HeaderContentType: "",
|
||||
HeaderFileSize: 0,
|
||||
HeaderUpdatedAt: time.Time{},
|
||||
HeaderRemoteURL: "",
|
||||
DisplayName: "",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
Bot: false,
|
||||
Reason: "hi, please let me in! I'm looking for somewhere neato bombeato to hang out.",
|
||||
Locked: false,
|
||||
Discoverable: false,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/weed_lord420",
|
||||
URL: "http://localhost:8080/@weed_lord420",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/weed_lord420/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/weed_lord420/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/weed_lord420/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/weed_lord420/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
ID: "59e197f5-87cd-4be8-ac7c-09082ccc4b4d",
|
||||
Username: "weed_lord420",
|
||||
AvatarMediaAttachmentID: "",
|
||||
HeaderMediaAttachmentID: "",
|
||||
DisplayName: "",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
Bot: false,
|
||||
Reason: "hi, please let me in! I'm looking for somewhere neato bombeato to hang out.",
|
||||
Locked: false,
|
||||
Discoverable: false,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/weed_lord420",
|
||||
URL: "http://localhost:8080/@weed_lord420",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/weed_lord420/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/weed_lord420/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/weed_lord420/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/weed_lord420/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
},
|
||||
"admin_account": {
|
||||
ID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
Username: "admin",
|
||||
AvatarFileName: "",
|
||||
AvatarContentType: "",
|
||||
AvatarFileSize: 0,
|
||||
AvatarUpdatedAt: time.Time{},
|
||||
AvatarRemoteURL: "",
|
||||
HeaderFileName: "",
|
||||
HeaderContentType: "",
|
||||
HeaderFileSize: 0,
|
||||
HeaderUpdatedAt: time.Time{},
|
||||
HeaderRemoteURL: "",
|
||||
DisplayName: "",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-72 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-72 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "",
|
||||
Locked: false,
|
||||
Discoverable: true,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/admin",
|
||||
URL: "http://localhost:8080/@admin",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/admin/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/admin/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/admin/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/admin/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
ID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
Username: "admin",
|
||||
AvatarMediaAttachmentID: "",
|
||||
HeaderMediaAttachmentID: "",
|
||||
DisplayName: "",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-72 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-72 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "",
|
||||
Locked: false,
|
||||
Discoverable: true,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/admin",
|
||||
URL: "http://localhost:8080/@admin",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/admin/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/admin/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/admin/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/admin/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
},
|
||||
"local_account_1": {
|
||||
ID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
Username: "the_mighty_zork",
|
||||
AvatarFileName: "http://localhost:8080/fileserver/media/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/original/75cfbe52-a5fb-451b-8f5a-b023229dce8d.jpeg",
|
||||
AvatarContentType: "image/jpeg",
|
||||
AvatarFileSize: 0,
|
||||
AvatarUpdatedAt: time.Time{},
|
||||
AvatarRemoteURL: "",
|
||||
HeaderFileName: "http://localhost:8080/fileserver/media/580072df-4d03-4684-a412-89fd6f7d77e6/header/original/9651c1ed-c288-4063-a95c-c7f8ff2a633f.jpeg",
|
||||
HeaderContentType: "image/jpeg",
|
||||
HeaderFileSize: 0,
|
||||
HeaderUpdatedAt: time.Time{},
|
||||
HeaderRemoteURL: "",
|
||||
DisplayName: "original zork (he/they)",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "hey yo this is my profile!",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-48 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-48 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "I wanna be on this damned webbed site so bad! Please! Wow",
|
||||
Locked: false,
|
||||
Discoverable: true,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork",
|
||||
URL: "http://localhost:8080/@the_mighty_zork",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/the_mighty_zork/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/the_mighty_zork/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/the_mighty_zork/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/the_mighty_zork/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
ID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
Username: "the_mighty_zork",
|
||||
AvatarMediaAttachmentID: "a849906f-8b8e-4b43-ac2f-6979ccbcd442",
|
||||
HeaderMediaAttachmentID: "",
|
||||
DisplayName: "original zork (he/they)",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "hey yo this is my profile!",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-48 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-48 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "I wanna be on this damned webbed site so bad! Please! Wow",
|
||||
Locked: false,
|
||||
Discoverable: true,
|
||||
Privacy: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork",
|
||||
URL: "http://localhost:8080/@the_mighty_zork",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/the_mighty_zork/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/the_mighty_zork/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/the_mighty_zork/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/the_mighty_zork/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
},
|
||||
"local_account_2": {
|
||||
ID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
Username: "1happyturtle",
|
||||
AvatarFileName: "http://localhost:8080/fileserver/media/eecaad73-5703-426d-9312-276641daa31e/avatar/original/d5e7c265-91a6-4d84-8c27-7e1efe5720da.jpeg",
|
||||
AvatarContentType: "image/jpeg",
|
||||
AvatarFileSize: 0,
|
||||
AvatarUpdatedAt: time.Time{},
|
||||
AvatarRemoteURL: "",
|
||||
HeaderFileName: "http://localhost:8080/fileserver/media/eecaad73-5703-426d-9312-276641daa31e/header/original/e75d4117-21b6-4315-a428-eb3944235996.jpeg",
|
||||
HeaderContentType: "image/jpeg",
|
||||
HeaderFileSize: 0,
|
||||
HeaderUpdatedAt: time.Time{},
|
||||
HeaderRemoteURL: "",
|
||||
DisplayName: "happy little turtle :3",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "i post about things that concern me",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-190 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-36 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "",
|
||||
Locked: true,
|
||||
Discoverable: false,
|
||||
Privacy: gtsmodel.VisibilityFollowersOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/1happyturtle",
|
||||
URL: "http://localhost:8080/@1happyturtle",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/1happyturtle/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/1happyturtle/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/1happyturtle/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/1happyturtle/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
ID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
Username: "1happyturtle",
|
||||
AvatarMediaAttachmentID: "",
|
||||
HeaderMediaAttachmentID: "",
|
||||
DisplayName: "happy little turtle :3",
|
||||
Fields: []gtsmodel.Field{},
|
||||
Note: "i post about things that concern me",
|
||||
Memorial: false,
|
||||
MovedToAccountID: "",
|
||||
CreatedAt: time.Now().Add(-190 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-36 * time.Hour),
|
||||
Bot: false,
|
||||
Reason: "",
|
||||
Locked: true,
|
||||
Discoverable: false,
|
||||
Privacy: gtsmodel.VisibilityFollowersOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
URI: "http://localhost:8080/users/1happyturtle",
|
||||
URL: "http://localhost:8080/@1happyturtle",
|
||||
LastWebfingeredAt: time.Time{},
|
||||
InboxURL: "http://localhost:8080/users/1happyturtle/inbox",
|
||||
OutboxURL: "http://localhost:8080/users/1happyturtle/outbox",
|
||||
SharedInboxURL: "",
|
||||
FollowersURL: "http://localhost:8080/users/1happyturtle/followers",
|
||||
FeaturedCollectionURL: "http://localhost:8080/users/1happyturtle/collections/featured",
|
||||
ActorType: gtsmodel.ActivityStreamsPerson,
|
||||
AlsoKnownAs: "",
|
||||
PrivateKey: &rsa.PrivateKey{},
|
||||
PublicKey: &rsa.PublicKey{},
|
||||
SensitizedAt: time.Time{},
|
||||
SilencedAt: time.Time{},
|
||||
SuspendedAt: time.Time{},
|
||||
HideCollections: false,
|
||||
SuspensionOrigin: "",
|
||||
},
|
||||
"remote_account_1": {
|
||||
ID: "c2c6e647-e2a9-4286-883b-e4a188186664",
|
||||
|
|
@ -643,9 +621,58 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
|
|||
Avatar: false,
|
||||
Header: false,
|
||||
},
|
||||
"local_account_1_avatar": {
|
||||
ID: "a849906f-8b8e-4b43-ac2f-6979ccbcd442",
|
||||
StatusID: "", // this attachment isn't connected to a status
|
||||
URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/original/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
|
||||
RemoteURL: "",
|
||||
CreatedAt: time.Now().Add(47 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(47 * time.Hour),
|
||||
Type: gtsmodel.FileTypeImage,
|
||||
FileMeta: gtsmodel.FileMeta{
|
||||
Original: gtsmodel.Original{
|
||||
Width: 1092,
|
||||
Height: 1800,
|
||||
Size: 1965600,
|
||||
Aspect: 0.6066666666666667,
|
||||
},
|
||||
Small: gtsmodel.Small{
|
||||
Width: 155,
|
||||
Height: 256,
|
||||
Size: 39680,
|
||||
Aspect: 0.60546875,
|
||||
},
|
||||
Focus: gtsmodel.Focus{
|
||||
X: 0,
|
||||
Y: 0,
|
||||
},
|
||||
},
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
Description: "a green goblin looking nasty",
|
||||
ScheduledStatusID: "",
|
||||
Blurhash: "LKK9MT,p|YSNDkJ-5rsmvnwcOoe:",
|
||||
Processing: 2,
|
||||
File: gtsmodel.File{
|
||||
Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/original/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
|
||||
ContentType: "image/jpeg",
|
||||
FileSize: 457680,
|
||||
UpdatedAt: time.Now().Add(47 * time.Hour),
|
||||
},
|
||||
Thumbnail: gtsmodel.Thumbnail{
|
||||
Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/small/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
|
||||
ContentType: "image/jpeg",
|
||||
FileSize: 15374,
|
||||
UpdatedAt: time.Now().Add(47 * time.Hour),
|
||||
URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/small/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
|
||||
RemoteURL: "",
|
||||
},
|
||||
Avatar: true,
|
||||
Header: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewTestEmojis returns a map of gts emojis, keyed by the emoji shortcode
|
||||
func NewTestEmojis() map[string]*gtsmodel.Emoji {
|
||||
return map[string]*gtsmodel.Emoji{
|
||||
"rainbow": {
|
||||
|
|
@ -693,9 +720,14 @@ func NewTestStoredAttachments() map[string]filenames {
|
|||
original: "ohyou-original.jpeg",
|
||||
small: "ohyou-small.jpeg",
|
||||
},
|
||||
"local_account_1_avatar": {
|
||||
original: "zork-original.jpeg",
|
||||
small: "zork-small.jpeg",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewtestStoredEmoji returns a map of filenames, keyed according to which emoji they pertain to
|
||||
func NewTestStoredEmoji() map[string]filenames {
|
||||
return map[string]filenames{
|
||||
"rainbow": {
|
||||
|
|
@ -710,24 +742,24 @@ func NewTestStoredEmoji() map[string]filenames {
|
|||
func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
return map[string]*gtsmodel.Status{
|
||||
"admin_account_status_1": {
|
||||
ID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
URI: "http://localhost:8080/users/admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
URL: "http://localhost:8080/@admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
Content: "hello world! #welcome ! first post on the instance :rainbow: !",
|
||||
Attachments: []string{"b052241b-f30f-4dc6-92fc-2bad0be1f8d8"},
|
||||
Tags: []string{"a7e8f5ca-88a1-4652-8079-a187eab8d56e"},
|
||||
Mentions: []string{},
|
||||
Emojis: []string{"a96ec4f3-1cae-47e4-a508-f9d66a6b221b"},
|
||||
CreatedAt: time.Now().Add(-71 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-71 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
ID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
URI: "http://localhost:8080/users/admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
URL: "http://localhost:8080/@admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
|
||||
Content: "hello world! #welcome ! first post on the instance :rainbow: !",
|
||||
Attachments: []string{"b052241b-f30f-4dc6-92fc-2bad0be1f8d8"},
|
||||
Tags: []string{"a7e8f5ca-88a1-4652-8079-a187eab8d56e"},
|
||||
Mentions: []string{},
|
||||
Emojis: []string{"a96ec4f3-1cae-47e4-a508-f9d66a6b221b"},
|
||||
CreatedAt: time.Now().Add(-71 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-71 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "9bf9e368-037f-444d-8ffd-1091d1c21c4c",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -738,20 +770,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"admin_account_status_2": {
|
||||
ID: "0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
URI: "http://localhost:8080/users/admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
URL: "http://localhost:8080/@admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
Content: "🐕🐕🐕🐕🐕",
|
||||
CreatedAt: time.Now().Add(-70 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-70 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "open to see some puppies",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
ID: "0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
URI: "http://localhost:8080/users/admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
URL: "http://localhost:8080/@admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
|
||||
Content: "🐕🐕🐕🐕🐕",
|
||||
CreatedAt: time.Now().Add(-70 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-70 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "open to see some puppies",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "9bf9e368-037f-444d-8ffd-1091d1c21c4c",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -762,20 +794,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_1_status_1": {
|
||||
ID: "91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
Content: "hello everyone!",
|
||||
CreatedAt: time.Now().Add(-47 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-47 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "introduction post",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
ID: "91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
|
||||
Content: "hello everyone!",
|
||||
CreatedAt: time.Now().Add(-47 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-47 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "introduction post",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -786,20 +818,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_1_status_2": {
|
||||
ID: "3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
Content: "this is an unlocked local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
|
||||
CreatedAt: time.Now().Add(-46 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-46 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityUnlocked,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
ID: "3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
|
||||
Content: "this is an unlocked local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
|
||||
CreatedAt: time.Now().Add(-46 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-46 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityUnlocked,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: false,
|
||||
|
|
@ -810,20 +842,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_1_status_3": {
|
||||
ID: "5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
Content: "this is a very personal post that I don't want anyone to interact with at all, and i only want mutuals to see it",
|
||||
CreatedAt: time.Now().Add(-45 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-45 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "test: you shouldn't be able to interact with this post in any way",
|
||||
Visibility: gtsmodel.VisibilityMutualsOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
ID: "5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
|
||||
Content: "this is a very personal post that I don't want anyone to interact with at all, and i only want mutuals to see it",
|
||||
CreatedAt: time.Now().Add(-45 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-45 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "test: you shouldn't be able to interact with this post in any way",
|
||||
Visibility: gtsmodel.VisibilityMutualsOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -834,21 +866,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_1_status_4": {
|
||||
ID: "18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
Content: "here's a little gif of trent",
|
||||
Attachments: []string{"510f6033-798b-4390-81b1-c38ca2205ad3"},
|
||||
CreatedAt: time.Now().Add(-1 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "eye contact, trent reznor gif",
|
||||
Visibility: gtsmodel.VisibilityMutualsOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
ID: "18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
|
||||
Content: "here's a little gif of trent",
|
||||
Attachments: []string{"510f6033-798b-4390-81b1-c38ca2205ad3"},
|
||||
CreatedAt: time.Now().Add(-1 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "eye contact, trent reznor gif",
|
||||
Visibility: gtsmodel.VisibilityMutualsOnly,
|
||||
Sensitive: false,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -859,20 +891,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_2_status_1": {
|
||||
ID: "8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
URL: "http://localhost:8080/@1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
Content: "🐢 hi everyone i post about turtles 🐢",
|
||||
CreatedAt: time.Now().Add(-189 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-189 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "introduction post",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
ID: "8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
URL: "http://localhost:8080/@1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
|
||||
Content: "🐢 hi everyone i post about turtles 🐢",
|
||||
CreatedAt: time.Now().Add(-189 * time.Hour),
|
||||
UpdatedAt: time.Now().Add(-189 * time.Hour),
|
||||
Local: true,
|
||||
AccountID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "introduction post",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -883,20 +915,20 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_2_status_2": {
|
||||
ID: "c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
URL: "http://localhost:8080/@1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
Content: "🐢 this one is federated, likeable, and boostable but not replyable 🐢",
|
||||
CreatedAt: time.Now().Add(-1 * time.Minute),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Minute),
|
||||
Local: true,
|
||||
AccountID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
ID: "c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
URL: "http://localhost:8080/@1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
|
||||
Content: "🐢 this one is federated, likeable, and boostable but not replyable 🐢",
|
||||
CreatedAt: time.Now().Add(-1 * time.Minute),
|
||||
UpdatedAt: time.Now().Add(-1 * time.Minute),
|
||||
Local: true,
|
||||
AccountID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "",
|
||||
Visibility: gtsmodel.VisibilityPublic,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
|
|
@ -906,9 +938,34 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
|||
},
|
||||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
"local_account_2_status_3": {
|
||||
ID: "75960e30-7a8e-4f45-87fa-440a4d1c9572",
|
||||
URI: "http://localhost:8080/users/1happyturtle/statuses/75960e30-7a8e-4f45-87fa-440a4d1c9572",
|
||||
URL: "http://localhost:8080/@1happyturtle/statuses/75960e30-7a8e-4f45-87fa-440a4d1c9572",
|
||||
Content: "🐢 i don't mind people sharing this one but I don't want likes or replies to it because cba🐢",
|
||||
CreatedAt: time.Now().Add(-2 * time.Minute),
|
||||
UpdatedAt: time.Now().Add(-2 * time.Minute),
|
||||
Local: true,
|
||||
AccountID: "eecaad73-5703-426d-9312-276641daa31e",
|
||||
InReplyToID: "",
|
||||
BoostOfID: "",
|
||||
ContentWarning: "you won't be able to like or reply to this",
|
||||
Visibility: gtsmodel.VisibilityUnlocked,
|
||||
Sensitive: true,
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
|
||||
VisibilityAdvanced: >smodel.VisibilityAdvanced{
|
||||
Federated: true,
|
||||
Boostable: true,
|
||||
Replyable: false,
|
||||
Likeable: false,
|
||||
},
|
||||
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewTestTags returns a map of gts model tags keyed by their name
|
||||
func NewTestTags() map[string]*gtsmodel.Tag {
|
||||
return map[string]*gtsmodel.Tag{
|
||||
"welcome": {
|
||||
|
|
@ -923,3 +980,16 @@ func NewTestTags() map[string]*gtsmodel.Tag {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewTestFaves returns a map of gts model faves, keyed in the format [faving_account]_[target_status]
|
||||
func NewTestFaves() map[string]*gtsmodel.StatusFave {
|
||||
return map[string]*gtsmodel.StatusFave{
|
||||
"local_account_1_admin_account_status_1": {
|
||||
ID: "fc4d42ef-631c-4125-bd9d-88695131284c",
|
||||
CreatedAt: time.Now().Add(-47 * time.Hour),
|
||||
AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6", // local account 1
|
||||
TargetAccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f", // admin account
|
||||
StatusID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd", // admin account status 1
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue