     (db-common/with-timeout db-common/default-timeout
       (as-> (r/table table-name) query
         (r/get-all query index-value {:index index-name})
-           ;; Merge in last-activity-at, last-seen-at and sort-value
         (r/merge query (r/fn [post-row]
           (let [sort-field (-> (r/get-field post-row [:bookmarks])
                               (r/filter {:user-id user-id})

    (db-common/with-timeout db-common/default-timeout
      (as-> (r/table table-name) query
        (r/get-all query index-value {:index index-name})
           ;; Merge in last-activity-at, last-seen-at and sort-value
        (r/merge query (r/fn [post-row]
         (let [can-pin-to-container? (r/and (r/default (r/get-field post-row [:pins fixed-container-id]) nil)
                                             (r/or (r/ne container-id config/seen-home-container-id)

    (db-common/with-timeout db-common/default-timeout
      (as-> (r/table table-name) query
        (r/get-all query index-value {:index index-name})
        (r/merge query (r/fn [post-row]
           (let [sort-field (r/default (r/get-field post-row :published-at)
                                       (r/get-field post-row :created-at))
