Extracting email functions into a service (#14802)

* Extracting email functions into a service

* Fixing two shadowing errors

* Address PR review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-07-07 10:03:21 +02:00
коммит произвёл GitHub
родитель 10f5a8890c
Коммит b977017ca7
19 изменённых файлов: 232 добавлений и 391 удалений

Просмотреть файл

@@ -334,7 +334,6 @@ type AppIface interface {
AddChannelMember(userId string, channel *model.Channel, userRequestorId string, postRootId string) (*model.ChannelMember, *model.AppError)
AddConfigListener(listener func(*model.Config, *model.Config)) string
AddDirectChannels(teamId string, user *model.User) *model.AppError
AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError
AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
@@ -424,7 +423,6 @@ type AppIface interface {
CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)
CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)
CreateUserWithToken(user *model.User, token *model.Token) (*model.User, *model.AppError)
CreateVerifyEmailToken(userId string, newEmail string) (*model.Token, *model.AppError)
CreateWebhookPost(userId string, channel *model.Channel, text, overrideUsername, overrideIconUrl, overrideIconEmoji string, props model.StringInterface, postType string, postRootId string) (*model.Post, *model.AppError)
DataRetention() einterfaces.DataRetentionInterface
DeactivateGuests() *model.AppError
@@ -852,15 +850,10 @@ type AppIface interface {
SendAckToPushProxy(ack *model.PushNotificationAck) error
SendAutoResponse(channel *model.Channel, receiver *model.User) (bool, *model.AppError)
SendAutoResponseIfNecessary(channel *model.Channel, sender *model.User) (bool, *model.AppError)
SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError
SendEmailVerification(user *model.User, newEmail string) *model.AppError
SendEphemeralPost(userId string, post *model.Post) *model.Post
SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, siteURL string)
SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList, setOnline bool) ([]string, error)
SendPasswordReset(email string, siteURL string) (bool, *model.AppError)
SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)
SendRemoveExpiredLicenseEmail(email string, locale, siteURL string, licenseId string) *model.AppError
SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
ServeInterPluginRequest(w http.ResponseWriter, r *http.Request, sourcePluginId, destinationPluginId string)
ServePluginRequest(w http.ResponseWriter, r *http.Request)
Session() *model.Session