Skip to content

Commit

Permalink
[#362 #363] Allow additional keys in event-msg maps (@jjttjj)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjttjj authored and ptaoussanis committed Feb 1, 2020
1 parent 7d8ca80 commit 800f1bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/taoensso/sente.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
(defn client-event-msg? [x]
(and
(map? x)
(enc/ks= #{:ch-recv :send-fn :state :event :id :?data} x)
(enc/ks>= #{:ch-recv :send-fn :state :event :id :?data} x)
(let [{:keys [ch-recv send-fn state event]} x]
(and
(enc/chan? ch-recv)
Expand All @@ -162,9 +162,9 @@
(defn server-event-msg? [x]
(and
(map? x)
(enc/ks= #{:ch-recv :send-fn :connected-uids
:ring-req :client-id
:event :id :?data :?reply-fn :uid} x)
(enc/ks>= #{:ch-recv :send-fn :connected-uids
:ring-req :client-id
:event :id :?data :?reply-fn :uid} x)
(let [{:keys [ch-recv send-fn connected-uids
ring-req client-id event ?reply-fn]} x]
(and
Expand Down

0 comments on commit 800f1bb

Please sign in to comment.