aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorFChannel <=>2021-02-18 01:17:28 -0800
committerFChannel <=>2021-02-18 01:17:28 -0800
commit5cb76e8bf5b9c07d6c7980a403dc4faeea37c3b7 (patch)
tree0601bac2fa5d090ef7cf1c2d8c1fddf8c6364173 /client.go
parentaa42546b2786138330ddd921b340a2b0f9898d5c (diff)
changes to catalog db queries
Diffstat (limited to 'client.go')
-rw-r--r--client.go27
1 files changed, 4 insertions, 23 deletions
diff --git a/client.go b/client.go
index 6625888..11a187f 100644
--- a/client.go
+++ b/client.go
@@ -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)
}