summaryrefslogtreecommitdiff
path: root/addons/im/static/src/js/im.js
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-09-02 19:29:23 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-09-02 19:29:23 +0200
commitd8bbbdf7c576d1892c6a0487876fe8a12e0ceb41 (patch)
tree49eebcec2d50ec4f9a67f97a84d90af6a9e91bb5 /addons/im/static/src/js/im.js
parent1a82946928760ba9b37a12ab76c26851a9d60cab (diff)
wip
bzr revid: nicolas.vanhoren@openerp.com-20130902172923-n0ofkb51orxfrq75
Diffstat (limited to 'addons/im/static/src/js/im.js')
-rw-r--r--addons/im/static/src/js/im.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/addons/im/static/src/js/im.js b/addons/im/static/src/js/im.js
index 085903cbde5..79248b647e4 100644
--- a/addons/im/static/src/js/im.js
+++ b/addons/im/static/src/js/im.js
@@ -55,6 +55,7 @@
this.set("current_search", "");
this.users = [];
this.c_manager = new im_common.ConversationManager(this);
+ window.im_conversation_manager = this.c_manager;
this.on("change:right_offset", this.c_manager, _.bind(function() {
this.c_manager.set("right_offset", this.get("right_offset"));
}, this));
@@ -106,7 +107,7 @@
_.each(users, function(user) {
var widget = new instance.im.UserWidget(self, self.c_manager.get_user(user.id));
widget.appendTo(self.$(".oe_im_users"));
- widget.on("activate_user", self, self.activate_user);
+ widget.on("activate_user", self, function(user) {self.c_manager.chat_with_users([user]);});
self.users.push(widget);
});
_.each(old_users, function(user) {
@@ -136,12 +137,6 @@
}
this.shown = ! this.shown;
},
- activate_user: function(user) {
- var self = this;
- im_common.connection.model("im.session").call("session_get", [user.get("id"), self.c_manager.me.get("uuid")]).then(function(session) {
- self.c_manager.activate_session(session.id, true);
- });
- },
add_user: function(conversation, user) {
conversation.add_user(user);
},