users

package
v0.0.0-...-16966e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CreateUserJobKind = "invites.CreateUser"

Variables

View Source
var ErrNoAvatar = errors.New("user has no avatar")

ErrNoAvatar is returned when a user has no avatar set.

Functions

func ProxiedUserAvatar

func ProxiedUserAvatar(ctx context.Context, user db.User) (io.ReadCloser, error)

ProxiedUserAvatar starts the download of the user's avatar using the current "canonical" way, and if there's none, then it does anything at all. This ensures that whatever authentication is needed is done by the server itself and the image is proxied back.

Of course, we don't have a canonical way yet, so this just grabs your Matrix avatar by abusing matrix.devhack.net.

Errors returned here are also logged, so it's acceptable to ignore them.

Types

type CreateUserArgs

type CreateUserArgs struct {
	Username         string
	PendingAccountID int32
	CodeID           int32
	Code             string
}

func (CreateUserArgs) Kind

func (CreateUserArgs) Kind() string

type CreateUserOutput

type CreateUserOutput struct {
	Err     string
	SyncJob int64
}

type CreateUserWorker

type CreateUserWorker struct {
	river.WorkerDefaults[CreateUserArgs]
}

func (*CreateUserWorker) Work

type PurgeExpiredCodesArgs

type PurgeExpiredCodesArgs struct{}

func (PurgeExpiredCodesArgs) Kind

type PurgeExpiredCodesWorker

type PurgeExpiredCodesWorker struct {
	river.WorkerDefaults[PurgeExpiredCodesArgs]
}

func (*PurgeExpiredCodesWorker) Work

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL