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