             [chat.server.sync :as sync]
             [chat.server.s3 :as s3]
             [braid.api.embedly :as embedly]
-            [braid.server.conf :refer [config]]
-            [environ.core :refer [env]]))
+            [braid.server.conf :refer [config]]))
 
 (defn- edn-response [clj-body]
   {:headers {"Content-Type" "application/edn; charset=utf-8"}

                                         :avatar avatar-url
                                         :nickname nickname
                                         :password password})
                  referer (get-in req [:headers "referer"] (env :site-url))
                  [proto _ referrer-domain] (string/split referer #"/")]
              (do
                (db/user-add-to-group! (user :id) (invite :group-id))

            (if-let [user-id (get-in req [:session :user-id])]
              (do
                (join-group user-id group-id)
                (let [referer (get-in req [:headers "referer"] (config :site-url))
                      [proto _ referrer-domain] (string/split referer #"/")]
                  {:status 302
                   :headers {"Location" (str proto "//" referrer-domain "/" group-id "/inbox")}
