jumpserver/apps/notifications/backends/site_msg.py

15 lines
375 B
Python
Raw Normal View History

2021-06-11 09:11:29 +00:00
from notifications.site_msg import SiteMessageUtil as Client
from .base import BackendBase
class SiteMessage(BackendBase):
account_field = 'id'
def send_msg(self, users, subject, message):
accounts, __, __ = self.get_accounts(users)
Client.send_msg(subject, message, user_ids=accounts)
@classmethod
def is_enable(cls):
return True