 
 
 (defn store-mention
-  "Yeah"
   [uid pid]
   (mc/insert
    @db

    hid
    (:_id (store-hashtag text))))

(defn get-url-id
  "Get url id if exists otherwise store url"
  [url uid tid ts]
  (if-let [url-id (:_id (mc/find-one-as-map @db "urls" {:url url}))]
    url-id
    (if-let [expanded-url (:url (expand-url url))]
      (if-let [x-url-id (:_id (mc/find-one-as-map @db "urls" {:url expanded-url}))]
        x-url-id
        (:_id (store-url expanded-url uid tid ts)))
      nil)))


(defn get-type [{:keys [in_reply_to_status_id retweeted_status entities]}]
  (if in_reply_to_status_id
    :reply
    (if retweeted_status

(defn store-article
  "Fetch html document, extract title and store them"
  [{:keys [url content-type ts] :as expanded-url}]
  (let [raw-html (if (= url "Not available") nil (slurp url))
        html-title (if raw-html
                     (-> (java.io.StringReader. raw-html)
                         enlive/html-resource
                         (enlive/select [:head :title])
                         first
                         :content
                         first)
                     nil)
        #_(fetch-url-title url)]
    (mc/insert-and-return
     @db
     "articles"
