From d00d4cd7f971029cc3e35578105d776e08600bbe Mon Sep 17 00:00:00 2001 From: timb Date: Sat, 10 Apr 2010 02:54:58 -0700 Subject: fix not being able to fav bug --- src/site.clj | 2 ++ static/js/pichat.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/site.clj b/src/site.clj index fc61686..bcb2914 100644 --- a/src/site.clj +++ b/src/site.clj @@ -784,6 +784,8 @@ (remove-tag (session :user_id) (params :message_id) (params :tag)) (resp-error "NO_USER"))) +;; message-user-id: get messages posted by this user +;; tag-user-id: get messages tagged by this user (defnk tagged-dumps-template [session params tags url page-title :message-user-id false :tag-user-id false :logger (make-time-logger)] diff --git a/static/js/pichat.js b/static/js/pichat.js index 5de3337..7351fb4 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -101,10 +101,12 @@ function buildMsgContent(content) { return linkify(escapeHtml(content)); } +// todo: +// isLoading doesn't get passed the right thing by $.map in addMessages function buildMessageDiv(msg, isLoading) { removeOldMessages() var nick = escapeHtml(msg.nick); - var msgId = !isLoading ? 'id="message-' + msg.msg_id + '"' : ''; + var msgId = ('msg_id' in msg) ? 'id="message-' + msg.msg_id + '"' : ''; var loadingClass = isLoading ? ' loading' : ''; var containsImageClass = LastMsgContainsImage ? ' contains-image' : ''; return '
' -- cgit v1.2.3-70-g09d2