diff options
author | FChannel <> | 2021-07-31 11:42:59 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-31 11:42:59 -0700 |
commit | ac288d40da3235b9382d685c9958ad167a758bcd (patch) | |
tree | 676b11c79625a0ec5a6a0c6a52b94f89e1fe72e8 /outboxPost.go | |
parent | f0ce5bc6d4146bc1191b8f8428c387a9085217e5 (diff) |
added archive page and viewing
Diffstat (limited to 'outboxPost.go')
-rw-r--r-- | outboxPost.go | 6 |
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)) } } } |