Add inbox follow request handling
Some checks failed
/ docker (push) Failing after 3m6s

- Not tested yet
- Undo needs to be extended to also handle undo of follow
This commit is contained in:
Melody Becker 2025-05-08 08:32:02 +02:00
parent 7e60188fb5
commit d84a693b22
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
6 changed files with 130 additions and 17 deletions

View file

@ -11,6 +11,7 @@ const (
ActivitystreamsActivityTargetUser
ActivitystreamsActivityTargetBoost
ActivitystreamsActivityTargetReaction
ActivitystreamsActivityTargetFollow
)
func (n *ActivitystreamsActivityTargetType) Value() (driver.Value, error) {
@ -29,4 +30,5 @@ var AllActivitystreamsActivityTargetTypes = []ActivitystreamsActivityTargetType{
ActivitystreamsActivityTargetUser,
ActivitystreamsActivityTargetBoost,
ActivitystreamsActivityTargetReaction,
ActivitystreamsActivityTargetFollow,
}

View file

@ -7,6 +7,7 @@ type RelationType string
const (
RelationFollow RelationType = "follow" // X follows Y
RelationFollowRequest RelationType = "follow-request" // X has requested to follow Y but is not yet following Y
RelationMute RelationType = "mute" // X has Y muted (X doesn't see Y, but Y still X)
RelationNoBoosts RelationType = "no-boosts" // X has Ys boosts muted
RelationBlock RelationType = "block" // X has Y blocked (X doesn't see Y and Y doesn't see X)

View file

@ -9,5 +9,5 @@ type UserToUserRelation struct {
UserId string
TargetUser User // The user Y described in [RelationType]
TargetUserId string
Relation RelationType `gorm:"type:relation_type"`
Relation string `gorm:"type:relation_type"`
}