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 New ¶
func New( state *state.State, common *common.Processor, federator *federation.Federator, converter *typeutils.Converter, visFilter *visibility.Filter, muteFilter *mutes.Filter, statusFilter *status.Filter, emailSender email.Sender, webPushSender webpush.Sender, account *account.Processor, media *media.Processor, stream *stream.Processor, conversations *conversations.Processor, ) Processor
func (*Processor) ProcessFromClientAPI ¶
func (*Processor) ProcessFromFediAPI ¶
type Surface ¶
type Surface struct {
State *state.State
Converter *typeutils.Converter
Stream *stream.Processor
VisFilter *visibility.Filter
MuteFilter *mutes.Filter
StatusFilter *status.Filter
EmailSender email.Sender
WebPushSender webpush.Sender
Conversations *conversations.Processor
}
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 ¶
func (s *Surface) Notify( ctx context.Context, notificationType gtsmodel.NotificationType, targetAccount *gtsmodel.Account, originAccount *gtsmodel.Account, status *gtsmodel.Status, edit *gtsmodel.StatusEdit, ) 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 statusOrEditID can be empty.
Click to show internal directories.
Click to hide internal directories.