                    (if (= "success" (:connected? data))
                      (do
                        (f/init-data badge_content_id)
-                       (swap! state assoc :start-following true)
-                       )
+                       (swap! state assoc :start-following true))
                      (swap! state assoc :start-following false))
-                   (swap! state assoc :messages []
-                                      :page_count 0)
+                   (swap! state assoc
+                          :messages []
+                          :page_count 0)
                    (init-data state)))
       :error-handler (fn [{:keys [status status-text]}]
-                       )})))
+                       (dump (str status " " status-text)))})))
 
 (defn delete-message [id state]
-(ajax/POST
-     (path-for (str "/obpv1/social/delete_message/" id))
-     {:response-format :json
-      :keywords? true 
-      :handler (fn [data]
-                 (do
-                   (let [filtered-messages (filter #(not (= id (:id %))) (:messages @state))]
-                     (swap! state assoc :messages filtered-messages))
-                   ))
-      :error-handler (fn [{:keys [status status-text]}]
-                       )})
-)
+  (ajax/POST
+   (path-for (str "/obpv1/social/delete_message/" id))
+   {:response-format :json
+    :keywords? true 
+    :handler (fn [data]
+               (let [filtered-messages (filter #(not (= id (:id %))) (:messages @state))]
+                 (swap! state assoc :messages filtered-messages)))
+    :error-handler (fn [{:keys [status status-text]}]
+                    (dump (str status " " status-text)))}))
 
 (defn delete-message-button [id state]
   (let [delete-clicked (atom nil)]

                    (init-data state)
                    (.preventDefault %))} "Refresh"])

(defn content [state]
  (let [{:keys [messages badge_content_id start-following]} @state]
    [:div
     (message-textarea state)
                                        ;(refresh-button state)
     (if start-following
       [:div {:class (str "alert ""alert-success")}
        [:div.deletemessage
         [:button {:type       "button"
                   :class      "close"
                   :aria-label "OK"
                   :on-click   #(do
                                  (swap! state assoc :start-following false)
                                  (.preventDefault %))
                   }
          [:span {:aria-hidden "true"
                  :dangerouslySetInnerHTML {:__html "&times;"}}]]
       ]
        (str (t :social/Youstartedfollowbadge) "! ")
        [:a {:href "#" :on-click #(do
                                    (f/unfollow-ajax-post badge_content_id)
                                    (swap! state assoc :start-following false))} (t :social/Cancelfollowingbadge)]]
       )
     [message-list messages state]]))



                 :aria-label "OK"
                 :on-click   #(do
                                (reset! delete-clicked (if (= true @delete-clicked) nil true))
                                (.preventDefault %))}
        [:span {:aria-hidden "true"  
                :dangerouslySetInnerHTML {:__html "&times;"}}]]
       (if @delete-clicked
         [:div
