Cleanup, store likes
Some checks failed
/ docker (push) Failing after 3m1s

- Clean up some logging
- Properly store likes in db
This commit is contained in:
Melody Becker 2025-05-06 22:18:28 +02:00
parent c7f875a9c5
commit 03ca524c99
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
12 changed files with 222 additions and 44 deletions

View file

@ -2,7 +2,7 @@ package models
type Activity struct {
Id string `gorm:"primarykey"`
Type string `gorm:"type:activitystreams_activity_type"`
Type string // `gorm:"type:activitystreams_activity_type"`
ObjectId string
ObjectType uint32 // Target type: ActivitystreamsActivityTargetType
}

View file

@ -1,6 +1,10 @@
package models
import "gorm.io/gorm"
import (
"database/sql"
"gorm.io/gorm"
)
// A Reaction is a user liking a note using an emote
type Reaction struct {
@ -9,6 +13,6 @@ type Reaction struct {
NoteId string
Reactor User
ReactorId string
Emote Emote
EmoteId uint
Emote *Emote // Emote is optional. If not set, use the default emote of the server
EmoteId sql.NullInt64
}