diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-22 00:41:46 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-22 00:41:46 +0400 |
commit | 8eea37cbdbaca2c0eb94abca6c3c3e749f69e14c (patch) | |
tree | 29b75568241305789c342d5c93bbd880ec30fd49 /public | |
parent | 333e56b4d97b21b5898192e1d428e5c6c4ebeb5f (diff) |
Fix people socketing
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/web-socket-receiver.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/public/javascripts/web-socket-receiver.js b/public/javascripts/web-socket-receiver.js index eced35138..b00b30ae7 100644 --- a/public/javascripts/web-socket-receiver.js +++ b/public/javascripts/web-socket-receiver.js @@ -54,7 +54,7 @@ var WebSocketReceiver = { WebSocketReceiver.processLike(obj.post_id, obj.html); } else { - WebSocketReceiver.processPost(obj['class'], obj.post_id, obj.html, obj.aspect_ids); + WebSocketReceiver.processPost(obj.html, obj.aspect_ids); } } }, @@ -67,7 +67,9 @@ var WebSocketReceiver = { result_ul.siblings('.error').show(); result_ul.find('.error').text(response.response).show(); } else { - $('#people_stream').prepend(response.html).slideDown('slow', function(){}); + stream = $('#people_stream'); + stream.find('p').remove(); + stream.prepend(response.html).slideDown('slow', function(){}); var first_li = result_ul.find('li:first'); first_li.hide(); first_li.after(response.html); @@ -131,7 +133,7 @@ var WebSocketReceiver = { $('.likes', "#" + targetGUID).first().html(html); }, - processPost: function(className, postId, html, aspectIds) { + processPost: function(html, aspectIds) { if(WebSocketReceiver.onPageForAspects(aspectIds)) { ContentUpdater.addPostToStream(html); } |