aboutsummaryrefslogtreecommitdiff
path: root/outboxPost.go
diff options
context:
space:
mode:
Diffstat (limited to 'outboxPost.go')
-rw-r--r--outboxPost.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/outboxPost.go b/outboxPost.go
index beb49fb..d54dd8e 100644
--- a/outboxPost.go
+++ b/outboxPost.go
@@ -55,6 +55,11 @@ func ParseOutboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) {
nObj.Actor = Domain + "/" + actor.Name
nObj = WriteObjectToDB(db, nObj)
+
+ if len(nObj.To) == 0 {
+ ArchivePosts(db, actor)
+ }
+
activity := CreateActivity("Create", nObj)
activity = AddFollowersToActivity(db, activity)
go MakeActivityRequest(db, activity)
@@ -536,6 +541,7 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) {
if IsActorLocal(db, e) {
if !IsActorLocal(db, activity.Actor.Id) {
WriteObjectToCache(db, *activity.Object)
+ ArchivePosts(db, GetActorFromDB(db, e))
}
}
}