       (db/user-make-group-admin! user-id (new-group :id)))))
 
 (defmethod event-msg-handler :chat/search
-  [{:keys [event id ?data ring-req ?reply-fn send-fn user-id] :as ev-msg}]
+  [{:as ev-msg :keys [?data ?reply-fn user-id]}]
   ; this can take a while, so move it to a future
   (future
     (let [user-tags (db/tag-ids-for-user user-id)

  :stop (router))

(defmethod event-msg-handler :default
  [{:as ev-msg :keys [event id ?data ring-req ?reply-fn send-fn]}]
  (let [session (:session ring-req)
        uid     (:uid     session)]
    (debugf "Unhandled event: %s" event)

      user-id (?data :invitee-email) (?data :group-id))))

(defmethod event-msg-handler :chat/generate-invite-link
  [{:as ev-msg :keys [?data ?reply-fn user-id]}]
  (if (db/user-in-group? user-id (?data :group-id))
    (let [{:keys [group-id expires]} ?data]
      (?reply-fn {:link (invites/make-open-invite-link group-id expires)}))
