diff options
| author | Scott Ostler <scottbot9000@gmail.com> | 2011-01-04 16:17:46 -0500 |
|---|---|---|
| committer | Scott Ostler <scottbot9000@gmail.com> | 2011-01-04 16:17:46 -0500 |
| commit | 457125462cd658b6660289a292c367a0d560a792 (patch) | |
| tree | db94c009400bbdbfcb2998be2e635052f0820c4f /src/site.clj | |
| parent | 92b092823c21af1339e0d42716dc856357f93e85 (diff) | |
Second revision of topics
Diffstat (limited to 'src/site.clj')
| -rw-r--r-- | src/site.clj | 14 |
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 |
