mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-09 03:09:34 +00:00
perf: 修改支持 Django4
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from typing import Iterable, AnyStr
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from rest_framework.exceptions import APIException
|
||||
|
||||
from users.utils import construct_user_email
|
||||
from common.utils.common import get_logger
|
||||
from common.sdk.im.utils import digest, update_values
|
||||
from common.sdk.im.mixin import RequestMixin, BaseRequest
|
||||
from common.sdk.im.utils import digest, update_values
|
||||
from common.utils.common import get_logger
|
||||
from users.utils import construct_user_email
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
@@ -112,13 +112,13 @@ class WeCom(RequestMixin):
|
||||
update_values(extra_params, kwargs)
|
||||
|
||||
body = {
|
||||
"touser": '|'.join(users),
|
||||
"msgtype": "text",
|
||||
"agentid": self._agentid,
|
||||
"text": {
|
||||
"content": msg
|
||||
},
|
||||
**extra_params
|
||||
"touser": '|'.join(users),
|
||||
"msgtype": "text",
|
||||
"agentid": self._agentid,
|
||||
"text": {
|
||||
"content": msg
|
||||
},
|
||||
**extra_params
|
||||
}
|
||||
if markdown:
|
||||
body['msgtype'] = 'markdown'
|
||||
@@ -184,4 +184,3 @@ class WeCom(RequestMixin):
|
||||
return {
|
||||
'username': username, 'name': name, 'email': email
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user