summaryrefslogtreecommitdiff
path: root/src/site.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/site.clj')
-rw-r--r--src/site.clj14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/site.clj b/src/site.clj
index 6ebfb73..df5d9f7 100644
--- a/src/site.clj
+++ b/src/site.clj
@@ -71,9 +71,9 @@
(assoc d :created_on (.getTime (d :created_on))))
(defn message-room-link [m]
- (if (= (:key m) "dumpfm")
- "http://dump.fm/chat"
- (format "http://%s.dump.fm" (:key m))))
+ (if (default-room? (:key m *default-room*))
+ "http://dump.fm/"
+ (format "http://%s.dump.fm/" (:key m))))
(defn process-message-for-output [d]
(escape-html-deep
@@ -317,7 +317,7 @@ WHERE user_id IN
dumps))))))
(defn pull-recips [dumps]
- (set (apply concat (map #(get % "recips") dumps))))
+ (set (apply concat (map #(get % "recips" []) dumps))))
(defn profile
([session profile-nick] (profile session profile-nick "profile"))
@@ -642,7 +642,7 @@ WHERE user_id IN
mute (resp-error (format-mute mute))
:else
(let [content (validated-content content session)
- msg-info (insert-message! user-id nick (:avatar session) (:room_id room) content)
+ msg-info (insert-message! user-id nick (:avatar session) room content)
msg-id (:msg-id msg-info)]
(dosync
(let [msg-struct (build-msg nick content msg-id (:recips msg-info))]
@@ -686,7 +686,7 @@ WHERE user_id IN
process-message-for-output
(fetch-topic (:user_id session) topic))
recips (pull-recips msgs)
- st (fetch-template "topic" session)]
+ st (fetch-template "topic" session)]
(.setAttribute st "recips" (json-str recips))
(.setAttribute st "topic" topic)
(if-not (empty? msgs)
@@ -1092,7 +1092,7 @@ WHERE user_id IN
msg-info (insert-message! (:user_id session)
(:nick session)
(:avatar session)
- (:room_id room)
+ room
url)]
(copy (:tempfile image) dest)
(dosync