mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Client API endpoints + v. basic web view for pinned posts (#1547)
* implement status pin client api + web handler * make test names + comments more descriptive * don't use separate table for status pins * remove unused add + remove checking * tidy up + add some more tests
This commit is contained in:
@@ -1263,6 +1263,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
return map[string]*gtsmodel.Status{
|
||||
"admin_account_status_1": {
|
||||
ID: "01F8MH75CBF9JFX4ZAD54N0W0R",
|
||||
PinnedAt: TimeMustParse("2022-05-14T13:21:09+02:00"),
|
||||
URI: "http://localhost:8080/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
|
||||
URL: "http://localhost:8080/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
|
||||
Content: "hello world! #welcome ! first post on the instance :rainbow: !",
|
||||
@@ -1283,7 +1284,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1292,6 +1292,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
},
|
||||
"admin_account_status_2": {
|
||||
ID: "01F8MHAAY43M6RJ473VQFCVH37",
|
||||
PinnedAt: TimeMustParse("2022-05-14T14:21:09+02:00"),
|
||||
URI: "http://localhost:8080/users/admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
|
||||
URL: "http://localhost:8080/@admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
|
||||
Content: "🐕🐕🐕🐕🐕",
|
||||
@@ -1308,7 +1309,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1335,7 +1335,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1363,7 +1362,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1388,7 +1386,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1413,7 +1410,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
Pinned: FalseBool(),
|
||||
Federated: FalseBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1438,7 +1434,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: FalseBool(),
|
||||
Replyable: FalseBool(),
|
||||
@@ -1464,7 +1459,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1490,7 +1484,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1515,7 +1508,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1540,7 +1532,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: FalseBool(),
|
||||
@@ -1565,7 +1556,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: FalseBool(),
|
||||
@@ -1590,7 +1580,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: TrueBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: FalseBool(),
|
||||
Boostable: FalseBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1619,7 +1608,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1647,7 +1635,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1656,6 +1643,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
},
|
||||
"local_account_2_status_7": {
|
||||
ID: "01G20ZM733MGN8J344T4ZDDFY1",
|
||||
PinnedAt: TimeMustParse("2021-03-18T09:13:55+02:00"),
|
||||
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? 🐢",
|
||||
@@ -1673,7 +1661,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
@@ -1701,7 +1688,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||
Sensitive: FalseBool(),
|
||||
Language: "en",
|
||||
CreatedWithApplicationID: "",
|
||||
Pinned: FalseBool(),
|
||||
Federated: TrueBool(),
|
||||
Boostable: TrueBool(),
|
||||
Replyable: TrueBool(),
|
||||
|
Reference in New Issue
Block a user