mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
♻️ Restore or check for presence message types
Restore the `or` of `=` comparisons for presence message types instead of the `contains?` set literal. The literal builds a new set on every forwarded message while `or` over interned keywords allocates nothing, on a per-message path. AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
parent
1f60c447d3
commit
9880a9471d
@ -380,9 +380,10 @@
|
||||
(start-relay wsp fch
|
||||
#(files/has-read-permissions? cfg profile-id file-id)
|
||||
#(close-file-subscription cfg wsp file-id)
|
||||
(fn [message]
|
||||
(when (contains? #{:join-file :leave-file :disconnect}
|
||||
(:type message))
|
||||
(fn [{:keys [type]}]
|
||||
(when (or (= :join-file type)
|
||||
(= :leave-file type)
|
||||
(= :disconnect type))
|
||||
(mbus/pub! (::mbus/msgbus cfg)
|
||||
:topic file-id
|
||||
:message {:type :presence
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user