Add follower and following collections
All checks were successful
/ docker (push) Successful in 4m34s

This commit is contained in:
Melody Becker 2025-05-11 18:28:51 +02:00
parent b75db5676b
commit af6ff2dd30
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
11 changed files with 431 additions and 22 deletions

View file

@ -103,6 +103,17 @@ type IUser interface {
// LIMIT 1
GetByUsername(username string) (*gen.T, error)
// Get a user by the id.
// Restricted to users visible to ActivityPub
//
// SELECT * FROM @@table WHERE
// id = @id AND
// deleted_at IS NULL AND
// finished_registration = true AND
// verified = true
// LIMIT 1
GetById(id string) (*gen.T, error)
// Get all true public accounts (verified & no restricted follow & indexable)
// in a paged manner, sorted by date saved
//
@ -148,4 +159,15 @@ type IUser interface {
// )
// LIMIT 1
GetRemoteAccountByApUrl(url string) (*gen.T, error)
// Does a user with the given Id exist?
// The user must be visible from AP
//
// SELECT EXISTS(
// SELECT * FROM @@table WHERE
// id = @id AND
// deleted_at IS NULL AND
// verified = true
// )
DoesUserWithIdExist(id string) (bool, error)
}