aboutsummaryrefslogtreecommitdiff
path: root/activitypub/object.go
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub/object.go')
-rw-r--r--activitypub/object.go6
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" +