mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
fix: ensure all graphs are latest in those cases
1. upload a local graph 2. download a local graph 3. a remote graph has been deleted from another client
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
(ns frontend.worker.rtc.ws-util
|
||||
"Add RTC related logic to the function based on ws."
|
||||
(:require [cljs-http-missionary.client :as http]
|
||||
[frontend.worker.rtc.db :as rtc-db]
|
||||
[frontend.worker.rtc.exception :as r.ex]
|
||||
[frontend.worker.rtc.malli-schema :as rtc-schema]
|
||||
[frontend.worker.rtc.ws :as ws]
|
||||
[frontend.worker.state :as worker-state]
|
||||
[frontend.worker.util :as worker-util]
|
||||
[goog.string :as gstring]
|
||||
[logseq.graph-parser.utf8 :as utf8]
|
||||
[missionary.core :as m]))
|
||||
|
||||
(defn- handle-remote-ex
|
||||
[resp]
|
||||
(when (= :graph-not-exist (:type (:ex-data resp)))
|
||||
(rtc-db/remove-rtc-data-in-conn! (worker-state/get-current-repo))
|
||||
(worker-util/post-message :remote-graph-gone []))
|
||||
(if-let [e ({:graph-not-exist r.ex/ex-remote-graph-not-exist
|
||||
:graph-not-ready r.ex/ex-remote-graph-not-ready
|
||||
:bad-request-body r.ex/ex-bad-request-body
|
||||
|
||||
Reference in New Issue
Block a user