You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
926 B

  1. # Copyright 2016 Ildar Nasyrov <https://it-projects.info/team/iledarn>
  2. # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  3. # Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
  4. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  5. from odoo.http import request
  6. from odoo.addons.bus.controllers.main import BusController
  7. class MailChatController(BusController):
  8. # -----------------------------
  9. # Extends BUS Controller Poll
  10. # -----------------------------
  11. def _poll(self, dbname, channels, last, options):
  12. if request.session.uid:
  13. channels = list(channels) # do not alter original list
  14. channels.append((request.db, 'mail_move_message'))
  15. channels.append((request.db, 'mail_move_message.delete_message'))
  16. return super(MailChatController, self)._poll(dbname, channels, last, options)