 (defn show-status
   "status # show statuses in the last 8 hours"
   [{:keys [chat-source]}]
-  (let [str-chat-source (pr-str chat-source)]
-    (model/format-sts (model/status-since chat-source (-> 8 hours ago)))))
+  (model/format-sts (model/status-since (pr-str chat-source) (-> 8 hours ago))))
 
 (defn show-status-since
   "status since <n> <minutes|hours|days|weeks|months> ago # show status since a given time"

(ns yetibot.core.commands.status
  (:require
    [taoensso.timbre :refer [info warn error]]
    [yetibot.core.models.status :as model]
    [clj-time [core :refer [ago minutes hours days weeks years months]]]

  (let [str-chat-source (pr-str chat-source)]
    (info "add status in" str-chat-source ":" match)
    (model/add-status user str-chat-source match)
    (with-fresh-db (show-status args))))

(cmd-hook #"status"
          #"since (.+) (minutes*|hours*|days*|weeks*|months*)( ago)*" show-status-since
