[FIX] im_chat, im_livechat : fix the loading history for anonymous user and remove useless search_user_status rpc call.
This commit is contained in:
parent
57869b9001
commit
17b486f6f9
|
@ -263,6 +263,8 @@
|
|||
if(messages.length != NBR_LIMIT_HISTORY){
|
||||
self.loading_history = false;
|
||||
}
|
||||
}else{
|
||||
self.loading_history = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -479,7 +481,6 @@
|
|||
this.calc_box();
|
||||
|
||||
this.on("change:current_search", this, this.search_users_status);
|
||||
this.search_users_status();
|
||||
|
||||
// add a drag & drop listener
|
||||
self.c_manager.on("im_session_activated", self, function(conv) {
|
||||
|
|
|
@ -198,7 +198,7 @@ class im_chat_session(osv.Model):
|
|||
""" return if the given user_id is in the session """
|
||||
sids = self.search(cr, uid, [('uuid', '=', uuid)], context=context, limit=1)
|
||||
for session in self.browse(cr, uid, sids, context=context):
|
||||
if session.anonymous_name and not user_id:
|
||||
if session.anonymous_name and user_id == openerp.SUPERUSER_ID:
|
||||
return True
|
||||
else:
|
||||
return super(im_chat_session, self).is_in_session(cr, uid, uuid, user_id, context=context)
|
||||
|
@ -234,7 +234,7 @@ class LiveChatController(http.Controller):
|
|||
return request.render('im_livechat.loader', info)
|
||||
|
||||
@http.route('/im_livechat/get_session', type="json", auth="none")
|
||||
def get_session(self, channel_id, anonymous_name):
|
||||
def get_session(self, channel_id, anonymous_name, **kwargs):
|
||||
cr, uid, context, db = request.cr, request.uid or openerp.SUPERUSER_ID, request.context, request.db
|
||||
reg = openerp.modules.registry.RegistryManager.get(db)
|
||||
# if geoip, add the country name to the anonymous name
|
||||
|
|
Loading…
Reference in New Issue