summaryrefslogtreecommitdiff
path: root/internal/processing/workers/surfaceemail.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-06-06 15:43:25 +0200
committerLibravatar GitHub <noreply@github.com>2024-06-06 14:43:25 +0100
commitbcda048eab799284fc46d74706334bf9ef76dc83 (patch)
treec4595fe5e6e6fd570d59cee7095a336f2e884344 /internal/processing/workers/surfaceemail.go
parentdrop date (#2969) (diff)
downloadgotosocial-bcda048eab799284fc46d74706334bf9ef76dc83.tar.xz
[feature] Self-serve email change for users (#2957)
* [feature] Email change * frontend stuff for changing email * docs * tests etc * differentiate more clearly between local user+account and account * populate user
Diffstat (limited to 'internal/processing/workers/surfaceemail.go')
-rw-r--r--internal/processing/workers/surfaceemail.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/processing/workers/surfaceemail.go b/internal/processing/workers/surfaceemail.go
index 5f8ae1823..d0a40e6ba 100644
--- a/internal/processing/workers/surfaceemail.go
+++ b/internal/processing/workers/surfaceemail.go
@@ -74,7 +74,10 @@ func (s *Surface) emailUserReportClosed(ctx context.Context, report *gtsmodel.Re
// emailUserPleaseConfirm emails the given user
// to ask them to confirm their email address.
-func (s *Surface) emailUserPleaseConfirm(ctx context.Context, user *gtsmodel.User) error {
+//
+// If newSignup is true, template will be geared
+// towards someone who just created an account.
+func (s *Surface) emailUserPleaseConfirm(ctx context.Context, user *gtsmodel.User, newSignup bool) error {
if user.UnconfirmedEmail == "" ||
user.UnconfirmedEmail == user.Email {
// User has already confirmed this
@@ -104,6 +107,7 @@ func (s *Surface) emailUserPleaseConfirm(ctx context.Context, user *gtsmodel.Use
InstanceURL: instance.URI,
InstanceName: instance.Title,
ConfirmLink: confirmLink,
+ NewSignup: newSignup,
},
); err != nil {
return err