diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj index 3f7313291..38aba8f30 100644 --- a/backend/src/app/rpc/commands/files.clj +++ b/backend/src/app/rpc/commands/files.clj @@ -351,6 +351,7 @@ (sv/defmethod ::get-file-fragment "Retrieve a file fragment by its ID. Only authenticated users." {::doc/added "1.17" + ::rpc/auth false ::sm/params schema:get-file-fragment ::sm/result schema:file-fragment} [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id fragment-id share-id]}] diff --git a/frontend/src/app/main/data/viewer.cljs b/frontend/src/app/main/data/viewer.cljs index af8401d8a..a698e567c 100644 --- a/frontend/src/app/main/data/viewer.cljs +++ b/frontend/src/app/main/data/viewer.cljs @@ -74,9 +74,11 @@ (assoc-in [:viewer-local :interactions-show?] interactions-show?))) ptk/WatchEvent - (watch [_ _ _] + (watch [_ state _] (rx/of (fetch-bundle (d/without-nils params)) - (fetch-comment-threads params))) + ;; Only fetch threads for logged-in users + (when (some? (:profile state)) + (fetch-comment-threads params)))) ptk/EffectEvent (effect [_ _ _]