diff options
author | 2023-07-31 15:47:35 +0200 | |
---|---|---|
committer | 2023-07-31 15:47:35 +0200 | |
commit | 2796a2e82f16ade9872008878cf88299bd66b4e7 (patch) | |
tree | 76f7b69cc1da57ca10b71c57abf1892575bea100 /internal/typeutils/internaltoas_test.go | |
parent | [performance] cache follow, follow request and block ID lists (#2027) (diff) | |
download | gotosocial-2796a2e82f16ade9872008878cf88299bd66b4e7.tar.xz |
[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)
* update go-fed
* do the things
* remove unused columns from tags
* update to latest lingo from main
* further tag shenanigans
* serve stub page at tag endpoint
* we did it lads
* tests, oh tests, ohhh tests, oh tests (doo doo doo doo)
* swagger docs
* document hashtag usage + federation
* instanceGet
* don't bother parsing tag href
* rename whereStartsWith -> whereStartsLike
* remove GetOrCreateTag
* dont cache status tag timelineability
Diffstat (limited to 'internal/typeutils/internaltoas_test.go')
-rw-r--r-- | internal/typeutils/internaltoas_test.go | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/internal/typeutils/internaltoas_test.go b/internal/typeutils/internaltoas_test.go index 60c59326c..30e4f2135 100644 --- a/internal/typeutils/internaltoas_test.go +++ b/internal/typeutils/internaltoas_test.go @@ -403,17 +403,24 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASWithIDs() { }, "sensitive": false, "summary": "", - "tag": { - "icon": { - "mediaType": "image/png", - "type": "Image", - "url": "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png" + "tag": [ + { + "icon": { + "mediaType": "image/png", + "type": "Image", + "url": "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png" + }, + "id": "http://localhost:8080/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ", + "name": ":rainbow:", + "type": "Emoji", + "updated": "2021-09-20T10:40:37Z" }, - "id": "http://localhost:8080/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ", - "name": ":rainbow:", - "type": "Emoji", - "updated": "2021-09-20T10:40:37Z" - }, + { + "href": "http://localhost:8080/tags/welcome", + "name": "#welcome", + "type": "Hashtag" + } + ], "to": "https://www.w3.org/ns/activitystreams#Public", "type": "Note", "url": "http://localhost:8080/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R" @@ -463,17 +470,24 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASFromDB() { }, "sensitive": false, "summary": "", - "tag": { - "icon": { - "mediaType": "image/png", - "type": "Image", - "url": "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png" + "tag": [ + { + "icon": { + "mediaType": "image/png", + "type": "Image", + "url": "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png" + }, + "id": "http://localhost:8080/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ", + "name": ":rainbow:", + "type": "Emoji", + "updated": "2021-09-20T10:40:37Z" }, - "id": "http://localhost:8080/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ", - "name": ":rainbow:", - "type": "Emoji", - "updated": "2021-09-20T10:40:37Z" - }, + { + "href": "http://localhost:8080/tags/welcome", + "name": "#welcome", + "type": "Hashtag" + } + ], "to": "https://www.w3.org/ns/activitystreams#Public", "type": "Note", "url": "http://localhost:8080/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R" |