[FIX] im_livechat : anonymous_name should be the user name in case of portal user

This commit is contained in:
Jérome Maes
2015-09-14 10:16:13 +02:00
parent 9571bed376
commit a58e00bcdb
+1 -1
View File
@@ -36,7 +36,7 @@ class LivechatController(http.Controller):
anonymous_name = anonymous_name + " ("+request.session.geoip.get('country_name', "")+")"
# if the user is identifiy (eg: portal user on the frontend), don't use the anonymous name. The user will be added to session.
if request.session.uid:
anonymous_name = False
anonymous_name = request.env.user.name
return request.env["im_livechat.channel"].get_mail_channel(channel_id, anonymous_name)
@http.route('/im_livechat/feedback', type='json', auth='public')