entari-plugin-server 0.7.1__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: entari-plugin-server
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Entari plugin for running Satori Server
5
5
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "entari-plugin-server"
3
- version = "0.7.1"
3
+ version = "0.7.2"
4
4
  description = "Entari plugin for running Satori Server"
5
5
  authors = [
6
6
  { name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com" },
@@ -35,7 +35,7 @@ plugin.metadata(
35
35
  "server",
36
36
  PluginRole.LIBRARY,
37
37
  [{"name": "RF-Tar-Railt", "email": "rf_tar_railt@qq.com"}],
38
- "0.7.1",
38
+ "0.7.2",
39
39
  description="为 Entari 提供 Satori 服务器支持,基于此为 Entari 提供 ASGI 服务、适配器连接等功能",
40
40
  urls={
41
41
  "homepage": "https://github.com/ArcletProject/entari-plugin-server",
@@ -3,6 +3,7 @@ from io import BytesIO
3
3
  from arclet.entari import Entari
4
4
  from arclet.entari.logger import log
5
5
  from arclet.entari.session import EntariProtocol
6
+ from arclet.letoderea.utils import add_task
6
7
  from satori import Api, Event
7
8
  from satori.client import Account, ApiInfo
8
9
  from satori.exception import (
@@ -64,6 +65,7 @@ class DirectAdapterProtocol(EntariProtocol):
64
65
  req._form = _form
65
66
  else:
66
67
  req._json = params or {}
68
+
67
69
  resp = await self.server.http_server_handler(req)
68
70
  if isinstance(resp, JSONResponse):
69
71
  return decode(resp.body) # type: ignore
@@ -108,4 +110,4 @@ class DirectAdapterServer(Server):
108
110
  else:
109
111
  acc = app.accounts[login_sn].custom(protocol_cls=DirectAdapterProtocol)
110
112
  acc.protocol.server = self
111
- await app.handle_event(acc, event)
113
+ add_task(app.handle_event(acc, event))