mirror of https://github.com/jumpserver/jumpserver
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
399 B
18 lines
399 B
from notifications.site_msg import SiteMessageUtil as Client
|
|
from .base import BackendBase
|
|
|
|
|
|
class SiteMessage(BackendBase):
|
|
account_field = 'id'
|
|
|
|
def send_msg(self, users, message, subject):
|
|
accounts, __, __ = self.get_accounts(users)
|
|
Client.send_msg(subject, message, user_ids=accounts)
|
|
|
|
@classmethod
|
|
def is_enable(cls):
|
|
return True
|
|
|
|
|
|
backend = SiteMessage
|