Fix like socketing to use GUIDs
This commit is contained in:
parent
8eea37cbdb
commit
1ba49caeca
1 changed files with 4 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ var WebSocketReceiver = {
|
||||||
WSR.debug(debug_string);
|
WSR.debug(debug_string);
|
||||||
|
|
||||||
if (obj['class']=="retractions") {
|
if (obj['class']=="retractions") {
|
||||||
WebSocketReceiver.processRetraction(obj.post_id);
|
WebSocketReceiver.processRetraction(obj.post_guid);
|
||||||
|
|
||||||
} else if (obj['class']=="comments") {
|
} else if (obj['class']=="comments") {
|
||||||
WebSocketReceiver.processComment(obj.post_guid, obj.comment_guid, obj.html, {
|
WebSocketReceiver.processComment(obj.post_guid, obj.comment_guid, obj.html, {
|
||||||
|
|
@ -51,7 +51,7 @@ var WebSocketReceiver = {
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (obj['class']=="likes") {
|
} else if (obj['class']=="likes") {
|
||||||
WebSocketReceiver.processLike(obj.post_id, obj.html);
|
WebSocketReceiver.processLike(obj.post_guid, obj.html);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WebSocketReceiver.processPost(obj.html, obj.aspect_ids);
|
WebSocketReceiver.processPost(obj.html, obj.aspect_ids);
|
||||||
|
|
@ -83,8 +83,8 @@ var WebSocketReceiver = {
|
||||||
Diaspora.widgets.notifications.showNotification(notification);
|
Diaspora.widgets.notifications.showNotification(notification);
|
||||||
},
|
},
|
||||||
|
|
||||||
processRetraction: function(post_id){
|
processRetraction: function(post_guid){
|
||||||
$("#" + post_id).fadeOut(400, function() {
|
$("#" + post_guid).fadeOut(400, function() {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
if($("#main_stream")[0].childElementCount === 0) {
|
if($("#main_stream")[0].childElementCount === 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue