Start work on likes/reactions
Some checks failed
/ docker (push) Failing after 1m35s

This commit is contained in:
Melody Becker 2025-06-13 16:45:28 +02:00
parent 8d2e008125
commit 4b62c32247
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
4 changed files with 77 additions and 2 deletions

View file

@ -6,7 +6,9 @@ import (
"gorm.io/gorm"
)
// A Reaction is a user liking a note using an emote
// A Reaction is a user liking a note (optionally using an emote)
// A reaction may contain some content text. If yes, this is the reaction.
// It also may contain a specifically linked emote (via tag). If yes, this is the reaction and takes precedence over the content
type Reaction struct {
gorm.Model
Note Note
@ -15,4 +17,5 @@ type Reaction struct {
ReactorId string
Emote *Emote // Emote is optional. If not set, use the default emote of the server
EmoteId sql.NullInt64
Content sql.NullString // Content/text of the reaction. Used for example in cases where a unicode character is sent as emote reaction
}