presence/app/assets/javascripts/chat_persistence.js in social_stream-0.21.3 vs presence/app/assets/javascripts/chat_persistence.js in social_stream-0.21.4
- old
+ new
@@ -144,11 +144,11 @@
var visibleMinSlugs = [];
}
for (var i=0;i<storedSlugs.length;i++){
- restoreLog = sessionStorage.getItem("chat_log_" + storedSlugs[i]);
+ var restoreLog = sessionStorage.getItem("chat_log_" + storedSlugs[i]);
if (restoreLog != null){
//Create window (if it not exists)
@@ -177,13 +177,11 @@
//Always created.
}
window[getChatVariableFromSlug(guest_slug)].html(restoreLog)
- //Mark as disconnect if user is offline.
- if (typeof($('div.user_presence[slug=' + guest_slug + ']').attr('name')) == 'undefined') {
- //No connectionBox for this user!
- showChatNotificationForSlug(guest_slug,guest_name + " is offline");
+ if (! isSlugChatConnected(guest_slug)) {
+ showOfflineChatNotificationForSlug(guest_slug);
}
}
}
}
\ No newline at end of file