From cd99df8d6781c3f0a191d119ea0ddf8c4a16089f Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 19 Jun 2022 12:23:54 -0700 Subject: moving files from static to view dir --- activitypub/object.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activitypub') diff --git a/activitypub/object.go b/activitypub/object.go index 9e6a97b..f01d97d 100644 --- a/activitypub/object.go +++ b/activitypub/object.go @@ -1463,11 +1463,15 @@ func (obj ObjectBase) IsLocked() (bool, error) { } func (obj ObjectBase) SendEmailNotify() error { + if setup := util.IsEmailSetup(); !setup { + return nil + } + actor, _ := GetActorFromDB(obj.Actor) from := config.SiteEmail pass := config.SiteEmailPassword - to := "" + to := config.SiteEmailNotifyTo body := fmt.Sprintf("New post: %s", config.Domain+"/"+actor.Name+"/"+util.ShortURL(actor.Outbox, obj.Id)) msg := "From: " + from + "\n" + -- cgit v1.2.3