                       {:url expanded-url
                        :content-type content-type})
                   (catch Exception e (do (error (str e))
-                                         {:url "Not available"
+                                         {:url :not-available
                                           :content-type content-type})))))
             (catch Exception e (do (error (str e))
                                    nil))))

    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-mention
  [uid pid]
  (mc/insert
   @db
