diff options
author | FChannel <> | 2022-06-19 12:23:54 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | cd99df8d6781c3f0a191d119ea0ddf8c4a16089f (patch) | |
tree | 2f3bc281a3a1c631a9c865e3ddb117e7054b6c9f /activitypub | |
parent | d88b68d2287716e663f723f46f830dc2b9043595 (diff) |
moving files from static to view dir
Diffstat (limited to 'activitypub')
-rw-r--r-- | activitypub/object.go | 6 |
1 files changed, 5 insertions, 1 deletions
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" + |