add email sender to processor

This commit is contained in:
tsmethurst 2021-10-17 10:50:57 +02:00
commit 5f6a0cd8cf
25 changed files with 139 additions and 220 deletions

View file

@ -25,6 +25,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@ -86,10 +87,11 @@ type processor struct {
formatter text.Formatter
db db.DB
federator federation.Federator
emailSender email.Sender
}
// New returns a new account processor.
func New(db db.DB, tc typeutils.TypeConverter, mediaHandler media.Handler, oauthServer oauth.Server, fromClientAPI chan messages.FromClientAPI, federator federation.Federator, config *config.Config) Processor {
func New(db db.DB, tc typeutils.TypeConverter, mediaHandler media.Handler, oauthServer oauth.Server, fromClientAPI chan messages.FromClientAPI, federator federation.Federator, emailSender email.Sender, config *config.Config) Processor {
return &processor{
tc: tc,
config: config,
@ -100,5 +102,6 @@ func New(db db.DB, tc typeutils.TypeConverter, mediaHandler media.Handler, oauth
formatter: text.NewFormatter(config, db),
db: db,
federator: federator,
emailSender: emailSender,
}
}