Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (*Processor) ProcessFromClientAPI ¶
func (*Processor) ProcessFromFediAPI ¶
type Surface ¶ added in v0.16.0
type Surface struct { State *state.State Converter *typeutils.Converter Stream *stream.Processor Filter *visibility.Filter EmailSender email.Sender }
Surface wraps functions for 'surfacing' the result of processing a message, eg:
- timelining a status
- removing a status from timelines
- sending a notification to a user
- sending an email
func (*Surface) Notify ¶ added in v0.16.0
func (s *Surface) Notify( ctx context.Context, notificationType gtsmodel.NotificationType, targetAccount *gtsmodel.Account, originAccount *gtsmodel.Account, statusID string, ) error
Notify creates, inserts, and streams a new notification to the target account if it doesn't yet exist with the given parameters.
It filters out non-local target accounts, so it is safe to pass all sorts of notification targets into this function without filtering for non-local first.
targetAccount and originAccount must be set, but statusID can be an empty string.
Click to show internal directories.
Click to hide internal directories.