summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltoas_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-04-26 15:03:05 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-26 15:03:05 +0200
commitf7323c065a086533ce8c7f0f0cb3f69a80539992 (patch)
treeba1451f4d1c1841bcc0867599673d9527c31f2bf /internal/typeutils/internaltoas_test.go
parent[performance] rewrite timelines to rely on new timeline cache type (#3941) (diff)
downloadgotosocial-f7323c065a086533ce8c7f0f0cb3f69a80539992.tar.xz
[feature] Update attachment format, receive + send `focalPoint` prop + use it on the frontend (#4052)
* [feature] Update attachment format, receive + send `focalPoint` prop + use it on the frontend * whoops * boop * restore function signature of ExtractAttachments
Diffstat (limited to 'internal/typeutils/internaltoas_test.go')
-rw-r--r--internal/typeutils/internaltoas_test.go24
1 files changed, 20 insertions, 4 deletions
diff --git a/internal/typeutils/internaltoas_test.go b/internal/typeutils/internaltoas_test.go
index 7c05a14b8..37bfa31f3 100644
--- a/internal/typeutils/internaltoas_test.go
+++ b/internal/typeutils/internaltoas_test.go
@@ -597,6 +597,10 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASWithIDs() {
"Emoji": "toot:Emoji",
"Hashtag": "as:Hashtag",
"blurhash": "toot:blurhash",
+ "focalPoint": {
+ "@container": "@list",
+ "@id": "toot:focalPoint"
+ },
"sensitive": "as:sensitive",
"toot": "http://joinmastodon.org/ns#"
}
@@ -604,9 +608,13 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASWithIDs() {
"attachment": [
{
"blurhash": "LIIE|gRj00WB-;j[t7j[4nWBj[Rj",
+ "focalPoint": [
+ -0.5,
+ 0.5
+ ],
"mediaType": "image/jpeg",
- "name": "Black and white image of some 50's style text saying: Welcome On Board",
- "type": "Document",
+ "summary": "Black and white image of some 50's style text saying: Welcome On Board",
+ "type": "Image",
"url": "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/attachment/original/01F8MH6NEM8D7527KZAECTCR76.jpg"
}
],
@@ -697,6 +705,10 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASFromDB() {
"Emoji": "toot:Emoji",
"Hashtag": "as:Hashtag",
"blurhash": "toot:blurhash",
+ "focalPoint": {
+ "@container": "@list",
+ "@id": "toot:focalPoint"
+ },
"sensitive": "as:sensitive",
"toot": "http://joinmastodon.org/ns#"
}
@@ -704,9 +716,13 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASFromDB() {
"attachment": [
{
"blurhash": "LIIE|gRj00WB-;j[t7j[4nWBj[Rj",
+ "focalPoint": [
+ -0.5,
+ 0.5
+ ],
"mediaType": "image/jpeg",
- "name": "Black and white image of some 50's style text saying: Welcome On Board",
- "type": "Document",
+ "summary": "Black and white image of some 50's style text saying: Welcome On Board",
+ "type": "Image",
"url": "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/attachment/original/01F8MH6NEM8D7527KZAECTCR76.jpg"
}
],