conversations

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedMigrationState

type AdvancedMigrationState struct {
	MinID          string
	MaxIDInclusive string
}

type ConversationNotification

type ConversationNotification struct {
	// AccountID of a local account to deliver the notification to.
	AccountID string
	// Conversation as the notification payload.
	Conversation *apimodel.Conversation
}

ConversationNotification carries the arguments to processing/stream.Processor.Conversation.

type Processor

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

func New

func New(
	state *state.State,
	converter *typeutils.Converter,
	filter *visibility.Filter,
) Processor

func (*Processor) Delete

func (p *Processor) Delete(
	ctx context.Context,
	requestingAccount *gtsmodel.Account,
	id string,
) gtserror.WithCode

func (*Processor) GetAll

func (p *Processor) GetAll(
	ctx context.Context,
	requestingAccount *gtsmodel.Account,
	page *paging.Page,
) (*apimodel.PageableResponse, gtserror.WithCode)

GetAll returns conversations owned by the given account. The additional parameters can be used for paging.

func (*Processor) MigrateDMsToConversations

func (p *Processor) MigrateDMsToConversations(ctx context.Context) error

func (*Processor) Read

func (p *Processor) Read(
	ctx context.Context,
	requestingAccount *gtsmodel.Account,
	id string,
) (*apimodel.Conversation, gtserror.WithCode)

func (*Processor) UpdateConversationsForStatus

func (p *Processor) UpdateConversationsForStatus(ctx context.Context, status *gtsmodel.Status) ([]ConversationNotification, error)

UpdateConversationsForStatus updates all conversations related to a status, and returns a map from local account IDs to conversation notifications that should be sent to them.

Jump to

Keyboard shortcuts

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