From 439f6754acd1045ed4387e19f240f213b5221fdb Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 27 Nov 2022 22:37:28 +0000 Subject: [PATCH] Don't send emails to federated users --- routers/api/v1/activitypub/create.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/routers/api/v1/activitypub/create.go b/routers/api/v1/activitypub/create.go index 8a2f77398..38ee898e3 100644 --- a/routers/api/v1/activitypub/create.go +++ b/routers/api/v1/activitypub/create.go @@ -55,11 +55,12 @@ func createPerson(ctx context.Context, person *ap.Person) error { } user := &user_model.User{ - Name: name, - FullName: person.Name.String(), // May not exist!! - Email: email, - LoginType: auth.Federated, - LoginName: person.GetLink().String(), + Name: name, + FullName: person.Name.String(), // May not exist!! + Email: email, + LoginType: auth.Federated, + LoginName: person.GetLink().String(), + EmailNotificationsPreference: user_model.EmailNotificationsDisabled, } err = user_model.CreateUser(user) if err != nil {