Commit Graph
19 Commits
Author SHA1 Message Date
Christophe Simonis 100d604cb0 [FIX] im_livechat: correct loader js code 2016-01-07 18:16:20 +01:00
Aaron Bohy 21e2e85790 [FIX] bus,im_livechat: correctly detect livechat availability 2015-12-28 12:48:46 +01:00
Aaron Bohy d8605b7993 [FIX] im_livechat: matching rule in cache
The problem was that the matching rule was evaluated before sending the html
page, and the script was inserted in the page according to the matching rule
(it wasn't inserted if the rule was 'hide_button'). However, the matching rule
wasn't re-evaluated if the page was already in the cache. The page content thus
might depend on a matching rule computed for someone else in that case.

Rather than inserting the script according to the matching rule, we insert it
only if there is an operator available. We then ask for the matching rule in
the livechat widget, by RPC, and we reject its willStart deferred if the rule
says so. We also re-check for operator availability in the same RPC.
2015-12-24 12:59:46 +01:00
Aaron Bohy c58c8f4bd2 [FIX] im_livechat: use correct url to find rules that apply
The problem was that, when calling 'match_rules()' from the loader template,
we compared the wrong url with the url regexp defined in rules. Indeed, we used
the url of the page we were leaving, not the one we were going to.

We thus need to know if we are coming from the controller, or from the loader
template directly as the way to get the correct url differs.

Courtesy of JEM
2015-12-16 15:48:43 +01:00
Aaron Bohy 1029571c35 [FIX] im_livechat: various fixes
- Don't display livechat button if no operator available
- Livechat windows persistence through website pages
- Auto popup feature re-introduced (inadvertently removed at rev. f23f57cc)
- Operators that are 'away' are available, as 'away' means that the focus isn't
  on the Odoo tab for at least 10 minutes, but the user is still connected.
- Avoid duplicated messages when the visitor is a connected user
- Unfold livechat window on first 'close' click as the event is intercepted to
  ask the user feedback before actually closing the window
2015-12-15 10:01:20 +01:00
Jérome Maes a4b17c2621 [FIX] im_livechat : assets controller, mock_attachment includes id now.
I miss commit c3c2281a4d, so the search on attachment url is useless now.

Also check if the return content is not None, avoiding to decode base64 a None object.
2015-10-06 09:43:02 +02:00
Jérome Maes 8e63088dbc [FIX] im_livechat : web.session defined twice
On website page, in debug mode, error 'web.session already defined' appears in the console. This was due to the fact the namespace web.session was redefined a second time to bind the session on the server_url param for the livechat to work. On website page, this is already done by the native web.session (session_instance.js). Define a session in the bundle is required when livechat is intergrated on external page, so fetching the bundle is done through /im_livechat/loader/, and generating a web.session can be conditional.
2015-10-01 12:41:35 +02:00
Jérome Maes a9148a9f2e [FIX] im_livechat : assets controller was broken
The commit 6327cda0a7 introduce mock_attachment object, replacing ir.attachment. This new object doesn't not have id attribute : accessing it crashes. livechat controller needs to search on the mock url to generate the status, headers and content of the response via binary_content() method.
2015-10-01 12:41:08 +02:00
Jérome Maes a58e00bcdb [FIX] im_livechat : anonymous_name should be the user name in case of portal user 2015-09-14 10:16:13 +02:00
Nicolas Lempereur 1c4049463d [WIP] im_livechat: typo in controller arguments 2015-09-08 11:50:03 +02:00
Christophe Matthieu 522fcacb21 [IMP] base: assets now directly use /web/content url 2015-09-03 19:31:00 +02:00
Jérome Maes 132e96accb [IMP] im_livechat : refactoring + improving performance by removing rpc call 2015-09-01 20:58:11 +02:00
Jérome Maes 95b97d1010 [REF] im_livechat : refactoring, make it compatbile with the nw mail module, change reporting sql view (split them in 2), adapt view, ... 2015-09-01 20:16:09 +02:00
Jérome Maes a80219e292 [MIG] bus, im_chat, im_livechat, website_livechat : migration to new API.
Migrate the models and controller to new API. Renaming xml id according to convention, renaming openerp tag into odoo tag. Add comment strings and documentations.
2015-04-28 17:04:16 +02:00
Jérome Maes 7096fee53c [MIG] im_chat, im_livechat : re structure the modules files.
Create models/ and controllers/ directories, and split the Python and XML files to fit coding guidelines, and prepare migration.
2015-04-28 17:04:16 +02:00
Jérome Maes f8be7105e3 [FIX] im_livechat : starting a conversation can be done by an identified user (ie: a portal user).
The bus channel will still be public (using the uuid), but access to the message history and session information should be with the authenticated user and not the anonymous one. There is no anonymous name, and the request.session is used to identify the user.
2015-04-15 17:04:53 +02:00
Jérome Maes e36ffa8a55 [FIX] im_livechat : fix rule matching according to the country code found with GeoIP 2015-03-23 14:49:06 +01:00
Jérome Maes a82b139496 [IMP] livechat : when rating conversation, click on smiley save the rating value. Only display texterea when clicking on red smiley. 2015-02-04 15:24:48 +01:00
Jérome Maes ade60d54bb [IMP] im_livechat : make the feedback for livechat a standart feature using the rating mixin. Create a dependancy to rating. 2015-01-08 12:28:22 +01:00