Make the status session storage user specific.

This commit is contained in:
JC Brand 2012-06-21 18:51:54 +02:00
parent c53da4c12d
commit 931be34f41

View File

@ -134,7 +134,7 @@ var xmppchat = (function ($, console) {
var chat_content, var chat_content,
value; value;
if (jid === 'online-users-container') { if (jid === 'online-users-container') {
value = jarnxmpp.Storage.get('xmpp-status') || 'online'; value = jarnxmpp.Storage.get(xmppchat.username+'-xmpp-status') || 'online';
$(chat).find('#select-xmpp-status').val(value); $(chat).find('#select-xmpp-status').val(value);
} else { } else {
chat_content = $(chat).find('.chat-content'); chat_content = $(chat).find('.chat-content');
@ -431,6 +431,6 @@ $(document).ready(function () {
value = event.target.value; value = event.target.value;
$(document).trigger('xmppchat.send_presence', [jid, value]); $(document).trigger('xmppchat.send_presence', [jid, value]);
jarnxmpp.Storage.set('xmpp-status', value); jarnxmpp.Storage.set(xmppchat.username+'-xmpp-status', value);
}); });
}); });