ErisPulse-MatrixAdapter 1.0.0__tar.gz → 4.0.0__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,12 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ErisPulse-MatrixAdapter
3
- Version: 1.0.0
3
+ Version: 4.0.0
4
4
  Summary: ErisPulse的Matrix协议适配模块
5
5
  Author-email: wsu2059 <wsu2059@qq.com>
6
6
  Project-URL: homepage, https://github.com/ErisPulse/ErisPulse-MatrixAdapter
7
7
  Requires-Python: >=3.9
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: aiohttp>=3.8.0
10
9
 
11
10
  # MatrixAdapter 模块文档
12
11
 
@@ -92,24 +91,35 @@ await matrix.Send.To("group", room_id).Raw_ob12(message)
92
91
 
93
92
  ### 配置说明
94
93
 
95
- 首次运行会自动生成默认配置。
94
+ 首次运行会自动生成默认配置。MatrixAdapter 支持多账户配置。
96
95
 
97
96
  ```toml
98
97
  # config.toml
99
- [Matrix_Adapter]
98
+ # 账户1
99
+ [Matrix_Adapter.accounts.default]
100
100
  homeserver = "https://matrix.org" # Matrix服务器地址(必填)
101
101
  access_token = "YOUR_ACCESS_TOKEN" # 访问令牌(与 user_id+password 二选一)
102
102
  user_id = "" # Matrix用户ID(如 @bot:matrix.org)
103
103
  password = "" # Matrix用户密码
104
104
  auto_accept_invites = true # 是否自动接受房间邀请(可选,默认为true)
105
+ enabled = true # 是否启用(可选,默认为true)
106
+
107
+ # 账户2
108
+ [Matrix_Adapter.accounts.bot2]
109
+ homeserver = "https://matrix.example.com"
110
+ access_token = "ANOTHER_TOKEN"
111
+ enabled = true
105
112
  ```
106
113
 
107
- **配置项说明:**
114
+ > 兼容旧配置:若检测到旧的单账户 `[Matrix_Adapter]` 配置(含 access_token),会自动迁移为 `accounts.default`。
115
+
116
+ **配置项说明(每个账户):**
108
117
  - `homeserver`:Matrix服务器地址(必填),默认为 `https://matrix.org`
109
118
  - `access_token`:访问令牌,可从Matrix客户端(如 Element)的设置中获取
110
119
  - `user_id`:Matrix用户ID(如 `@bot:matrix.org`),与 `password` 配合使用
111
120
  - `password`:Matrix用户密码,用于自动登录获取 access_token
112
121
  - `auto_accept_invites`:是否自动接受房间邀请,默认为 `true`
122
+ - `enabled`:是否启用该账户(可选,默认为true)
113
123
 
114
124
  **认证方式:**
115
125
  - 方式一(推荐):直接提供 `access_token`
@@ -4,7 +4,6 @@ ErisPulse_MatrixAdapter.egg-info/PKG-INFO
4
4
  ErisPulse_MatrixAdapter.egg-info/SOURCES.txt
5
5
  ErisPulse_MatrixAdapter.egg-info/dependency_links.txt
6
6
  ErisPulse_MatrixAdapter.egg-info/entry_points.txt
7
- ErisPulse_MatrixAdapter.egg-info/requires.txt
8
7
  ErisPulse_MatrixAdapter.egg-info/top_level.txt
9
8
  MatrixAdapter/Converter.py
10
9
  MatrixAdapter/Core.py