Add room-scoped Matrix plugins and bilingual configuration commands

This commit is contained in:
eskima committed 2026-11-20 23:29:33 +08:00
1 parent 061bfbd12a
commit 8a87c893fd
75 files changed
+2559 -1975

No files matched your search

+3 -3
View File
@@ -29,11 +29,11 @@ node ./cross-sign.mjs
然后按提示**交互式粘贴**即可(无需任何环境变量 / 配置文件):
1. 账号域名或 API 地址(回车用默认 `tchncs.de`)
2. 账号 user id(回车用默认 `@eskimapro:tchncs.de`)
1. 输入账号域名或 API 地址
2. 输入完整的 Matrix 用户 ID,例如 `@bot:example.org`
3. 账号密码 —— **粘贴时不回显**
4. 安全密钥(base58,如 `EsTc ...`)—— 不回显;直接回车则改填安全短语
5. 要签名的设备 ID(回车用默认 `ZHEAJZJMDZ`;留空则签名名下所有未验证设备)
5. 输入要签名的设备 ID。留空后还需输入 `ALL` 才会签名所有未验证设备。
跑一次即可,之后无需再跑(除非 bot 重新登录产生了新设备)。
+8 -6
View File
@@ -60,8 +60,10 @@ let TARGET_DEVICE_ID = '';
async function main() {
console.log('=== bot 设备 cross-signing 工具 ===\n');
const homeserverInput = await ask('账号域名或 API 地址', 'tchncs.de');
const userId = await ask('账号 user id', '@eskimapro:tchncs.de');
const homeserverInput = await ask('账号域名或 API 地址');
if (!homeserverInput) fail('必须输入账号域名或 API 地址。');
const userId = await ask('账号 user id');
if (!userId) fail('必须输入账号 ID。');
PASSWORD = await askSecret('账号密码(粘贴,不回显)');
if (!PASSWORD) fail('必须输入密码。');
@@ -80,10 +82,10 @@ async function main() {
if (!SECURITY_PHRASE) fail('安全密钥和安全短语必须至少提供一个。');
}
TARGET_DEVICE_ID = await ask(
'要签名的设备 ID(留空=签名名下所有未验证设备)',
'ZHEAJZJMDZ',
);
TARGET_DEVICE_ID = await ask('要签名的设备 ID');
if (!TARGET_DEVICE_ID && await ask('签名所有未验证设备?输入 ALL 确认') !== 'ALL') {
fail('未选择签名目标。');
}
// 1) 解析真实 API 地址(支持裸域名 well-known 发现)
const baseUrl = await resolveBaseUrl(homeserverInput);