diff options
author | FChannel <=> | 2021-02-18 01:17:28 -0800 |
---|---|---|
committer | FChannel <=> | 2021-02-18 01:17:28 -0800 |
commit | 5cb76e8bf5b9c07d6c7980a403dc4faeea37c3b7 (patch) | |
tree | 0601bac2fa5d090ef7cf1c2d8c1fddf8c6364173 /client.go | |
parent | aa42546b2786138330ddd921b340a2b0f9898d5c (diff) |
changes to catalog db queries
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 27 |
1 files changed, 4 insertions, 23 deletions
@@ -150,28 +150,6 @@ func CatalogGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C actor := collection.Actor - var mergeCollection Collection - - - - mergeCollection.OrderedItems = collection.OrderedItems - - domainURL := GetDomainURL(*actor) - - if domainURL == Domain { - followCol := GetObjectsFromFollow(db, *actor) - for _, e := range followCol { - if e.Type != "Tombstone" { - mergeCollection.OrderedItems = append(mergeCollection.OrderedItems, e) - } - } - } - - DeleteRemovedPosts(db, &mergeCollection) - DeleteTombstonePosts(&mergeCollection) - - sort.Sort(ObjectBaseSortDesc(mergeCollection.OrderedItems)) - var returnData PageData returnData.Board.Name = actor.Name returnData.Board.PrefName = actor.PreferredUsername @@ -193,7 +171,10 @@ func CatalogGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C returnData.Boards = Boards - returnData.Posts = mergeCollection.OrderedItems + DeleteRemovedPosts(db, &collection) + DeleteTombstonePosts(&collection) + + returnData.Posts = collection.OrderedItems t.ExecuteTemplate(w, "layout", returnData) } |