   (if (valid-nickname? (?data :nickname))
     (try
       (do (db/run-txns! (user/set-nickname-txn user-id (?data :nickname)))
-          (broadcast-user-change user-id [:braid.client/name-change
+          (helpers/broadcast-user-change user-id [:braid.client/name-change
                                           {:user-id user-id
                                            :group-ids (map :id (group/user-groups user-id))
                                            :nickname (?data :nickname)}])

    [braid.core.server.search :as search]
    [braid.core.server.socket :refer [chsk-send! connected-uids]]
    [braid.core.server.sync-handler :refer [event-msg-handler]]
    [braid.core.server.sync-helpers :refer [broadcast-thread broadcast-user-change user-can-message? notify-users]]
    [braid.core.server.uploads :as s3-uploads]
    [braid.core.server.util :refer [valid-url?]]))


                        (update-in [:content] #(apply str (take 5000 %)))
                        (assoc :created-at (java.util.Date.)))]
    (if (new-message-valid? new-message)
      (when (helpers/user-can-message? user-id new-message)
        (db/run-txns! (message/create-message-txn new-message))
        (when-let [cb ?reply-fn]
          (cb :braid/ok))
        (helpers/broadcast-thread (new-message :thread-id) [])
        (helpers/notify-users new-message)
        (notify-bots new-message))
      (do
        (timbre/warnf "Malformed new message: %s" (pr-str new-message))
