                         (update-in [:content] #(apply str (take 5000 %)))
                         (assoc :created-at (java.util.Date.)))]
     (if (new-message-valid? new-message)
-      (when (user-can-message? user-id 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))
-        (broadcast-thread (new-message :thread-id) [])
-        (notify-users new-message)
+        (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))

    [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?]]))


  (let [{:keys [thread-id tag-id]} ?data]
    (let [group-id (tag/tag-group-id tag-id)]
      (db/run-txns! (thread/tag-thread-txn group-id thread-id tag-id))
      (helpers/broadcast-thread thread-id []))))
    ; TODO do we need to notify-users and notify-bots


