remotenotes

package
v1.2.43 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package remotenotes resolves and materializes remote note parents for request-scoped write-path flows such as create-status reply creation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedFetcher

type AuthorizedFetcher interface {
	FetchObject(ctx context.Context, objectURL string, signingActor *activitypub.Actor) (any, error)
}

AuthorizedFetcher fetches a remote ActivityPub object in the local replying-actor context when protected parent acquisition is required.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver resolves reply parents locally first and materializes unresolved canonical remote URLs on the create-status write path.

func NewReplyParentResolver

func NewReplyParentResolver(
	statusRepo statusRepository,
	objectRepo objectRepository,
	domainBlockRepo domainBlockRepository,
	fetcher AuthorizedFetcher,
	localDomain string,
	logger *zap.Logger,
) *Resolver

NewReplyParentResolver constructs a create-status reply-parent resolver over storage-first lookup plus optional authorized remote acquisition.

func (*Resolver) ResolveReplyParent

func (r *Resolver) ResolveReplyParent(
	ctx context.Context,
	author *storage.Account,
	rawInReplyTo string,
	requestedVisibility string,
) (*notes.ResolvedReplyParent, error)

ResolveReplyParent resolves a reply parent for a single create-note request, materializing a canonical remote parent when it is not yet stored locally.

Jump to

Keyboard shortcuts

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