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.

18 lines
740 B

  1. # Copyright 2017 mikaelh <https://github.com/mikaelh>
  2. # Copyright 2017-2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  3. # License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html)
  4. from odoo.addons.bus.controllers.main import BusController
  5. from odoo.http import request
  6. class MailChatController(BusController):
  7. # -----------------------------
  8. # Extends BUS Controller Poll
  9. # -----------------------------
  10. def _poll(self, dbname, channels, last, options):
  11. if request.session.uid:
  12. channels = list(channels) # do not alter original list
  13. channels.append((request.db, "mail_base.mail_sent"))
  14. return super(MailChatController, self)._poll(dbname, channels, last, options)