🐛 Add version to presence and fixes off-page updates

This commit is contained in:
alonso.torres 2023-03-16 16:44:11 +01:00 committed by Alejandro Alonso
parent cbe8587db3
commit a118f34b49
2 changed files with 18 additions and 8 deletions

View file

@ -204,7 +204,7 @@
(a/<! (mbus/sub! msgbus :topic team-id :chan channel)))))
(defmethod handle-message :subscribe-file
[cfg wsp {:keys [file-id] :as params}]
[cfg wsp {:keys [file-id version] :as params}]
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
profile-id (::profile-id @wsp)
@ -239,7 +239,8 @@
(let [message {:type :presence
:file-id file-id
:session-id session-id
:profile-id profile-id}]
:profile-id profile-id
:version version}]
(a/<! (mbus/pub! msgbus :topic file-id :message message))))
(a/>! output-ch message)
(recur))))