From a237e2b295fee71bdf7266520b0b6e0fb79b565c Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Mon, 29 Jul 2024 11:26:31 -0700 Subject: [feature] Implement following hashtags (#3141) * Implement followed tags API * Insert statuses with followed tags into home timelines * Test following and unfollowing tags * Correct Swagger path params * Trim conversation caches * Migration for followed_tags table * Followed tag caches and DB implementation * Lint and tests * Add missing tag info endpoint, reorganize tag API * Unwrap boosts when timelining based on tags * Apply visibility filters to tag followers * Address review comments --- internal/gtsmodel/tag.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/gtsmodel/tag.go') diff --git a/internal/gtsmodel/tag.go b/internal/gtsmodel/tag.go index 470bee094..0b66585eb 100644 --- a/internal/gtsmodel/tag.go +++ b/internal/gtsmodel/tag.go @@ -29,3 +29,12 @@ type Tag struct { Listable *bool `bun:",nullzero,notnull,default:true"` // Tagged statuses can be listed on this instance. Href string `bun:"-"` // Href of the hashtag. Will only be set on freshly-extracted hashtags from remote AP messages. Not stored in the database. } + +// FollowedTag represents a user following a tag. +type FollowedTag struct { + // ID of the account that follows the tag. + AccountID string `bun:"type:CHAR(26),pk,nullzero"` + + // ID of the tag. + TagID string `bun:"type:CHAR(26),pk,nullzero"` +} -- cgit v1.2.3