mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-07-12 19:27:14 +00:00
* 添加站内信 * s * s * 添加接口 * fix * fix * 重构了一些 * 完成 * 完善 * s * s * s * s * s * s * 测试ok * 替换业务中发送消息的方式 * 修改 * s * 去掉 update 兼容 create * 添加 unread total 接口 * 调整json字段 Co-authored-by: xinwen <coderWen@126.com>
15 lines
371 B
Python
15 lines
371 B
Python
from notifications.site_msg import SiteMessage 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
|