♻️ 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:
Andrey Antukh 2026-10-08 10:26:05 +00:00
parent 1f60c447d3
commit 9880a9471d

View File

@ -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