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.

19 lines
770 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 mikaelh <https://github.com/mikaelh>
  3. # Copyright 2017-2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  4. # License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html)
  5. from openerp.addons.bus.controllers.main import BusController
  6. from openerp.http import request
  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_base.mail_sent"))
  15. return super(MailChatController, self)._poll(dbname, channels, last, options)