mutes

package
v0.20.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

Filter packages up a bunch of logic for checking whether given statuses or accounts are muted by a requester (user).

func NewFilter

func NewFilter(state *state.State) *Filter

NewFilter returns a new Filter interface that will use the provided state.

func (*Filter) AccountMuted

func (f *Filter) AccountMuted(ctx context.Context, requester *gtsmodel.Account, account *gtsmodel.Account) (bool, error)

AccountMuted returns whether given target account is muted by requester.

func (*Filter) AccountNotificationsMuted

func (f *Filter) AccountNotificationsMuted(ctx context.Context, requester *gtsmodel.Account, account *gtsmodel.Account) (bool, error)

AccountNotificationsMuted returns whether notifications are muted for requester when incoming from given target account.

func (*Filter) StatusMuteDetails

func (f *Filter) StatusMuteDetails(ctx context.Context, requester *gtsmodel.Account, status *gtsmodel.Status) (*cache.CachedMute, error)

StatusMuteDetails returns mute details about the given status for the given requesting account.

func (*Filter) StatusMuted

func (f *Filter) StatusMuted(ctx context.Context, requester *gtsmodel.Account, status *gtsmodel.Status) (muted bool, err error)

StatusMuted returns whether given target status is muted for requester in the context of timeline visibility.

func (*Filter) StatusNotificationsMuted

func (f *Filter) StatusNotificationsMuted(ctx context.Context, requester *gtsmodel.Account, status *gtsmodel.Status) (muted bool, err error)

StatusNotificationsMuted returns whether notifications are muted for requester when regarding given target status.

Jump to

Keyboard shortcuts

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