DG IZ removed the latest message javascript as well as the hash
This commit is contained in:
parent
d211abb1bc
commit
e5036862f6
3 changed files with 6 additions and 17 deletions
|
|
@ -17,9 +17,9 @@ module SocketsHelper
|
|||
|
||||
if object.is_a? Photo
|
||||
action_hash[:photo_hash] = object.thumb_hash
|
||||
elsif object.is_a? StatusMessage
|
||||
action_hash[:status_message_hash] = object.latest_hash
|
||||
action_hash[:status_message_hash][:mine?] = true if object.person.owner_id == uid
|
||||
end
|
||||
if object.person.owner_id == uid
|
||||
acton_hash[:mine?] == true
|
||||
end
|
||||
|
||||
action_hash.to_json
|
||||
|
|
|
|||
|
|
@ -21,8 +21,5 @@ class StatusMessage < Post
|
|||
XML
|
||||
end
|
||||
|
||||
def latest_hash
|
||||
{ :text => message}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
}else if (obj['class']=='photos' && onPageForClass('albums')){
|
||||
processPhotoInAlbum(obj['photo_hash'])
|
||||
}else if (obj['class']=='status_messages'){
|
||||
processStatusMessage(obj['class'], obj['html'], obj['status_message_hash'], obj['group_id'])
|
||||
}else{
|
||||
processPost(obj['class'], obj['html'], obj['group_id'])
|
||||
if( (obj['mine?'] == true)|| (onPageForClass(obj['class']) || onPageForGroup(obj['group_id'])) ){
|
||||
processPost(obj['class'], obj['html'])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,14 +62,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function processStatusMessage(className, html, messageHash, groupId){
|
||||
processPost(className, html, groupId);
|
||||
console.log(messageHash)
|
||||
if(messageHash['mine?']){
|
||||
updateMyLatestStatus(messageHash);
|
||||
}
|
||||
}
|
||||
|
||||
function updateMyLatestStatus(messageHash){
|
||||
$("#latest_message").text(messageHash['text']);
|
||||
$("#latest_message_time").text(' - just now');
|
||||
|
|
|
|||
Loading…
Reference in a new issue