-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## mirai-core | ||
|
||
### 不兼容变更 | ||
|
||
- 删除了旧版的为兼容 Java 生成的阻塞式方法桥 | ||
> 这只会导致依赖 mirai [2.1.0](https://github.com/mamoe/mirai/releases/tag/2.1.0) (发布于 2 年前) 编译的 Java 代码现在无法使用 mirai 2.15.0-M1 级以上版本运行. 将它们使用 2.15.0-M1 及以上重新编译即可运行. | ||
> | ||
> 这是因为 KJBB 以前有 bug, 会生成返回值为 `Unit` 的方法桥. mirai 为了兼容, 一直让 KJBB 既生成返回 `Unit` 的, 也生成返回 `void` 的. 但自 Kotiln 编译器 1.8.0 起, 其 IR lowering 会把 `companion object` 中的静态函数 `@JvmStatic` 的返回值由 `Unit` 变更为 `void`, 导致编译器插件 KJBB 不再能做兼容. | ||
### 新特性 | ||
|
||
- 扫码登录 (#2502 with @StageGuard, #1281) | ||
|
||
### 优化和修复 | ||
|
||
- 更新 Kotlin 到 1.8.10, kotlinx-serialization 到 1.5.0 (#2578) | ||
- 修复特殊情况可能无法加载 services 的问题 (#2268, #2511 by @Nambers, #2428 by @cssxsh) | ||
- 增加 TxCaptchaHelper 可用性无法保证的警告 (#2564 by @MrXiaoM) | ||
- 修正 dumpTlvMap 返回值不正确 (#2557 by @MrXiaoM) | ||
- 修正多态序列化 (#2414) | ||
- 修正群公告发送失败 no login (#2069, #2512 by @cssxsh) | ||
- 修正使用 Announcements.get(fid) 出现 kotlinx.serialization.MissingFieldException: Field 'msg' (#2509, #2512 by @cssxsh) | ||
- 修正短暂断网时不能成功重连 (#2488, #2504, #2505 by @sandtechnology) | ||
- OfflinMessageSource 回复错误 (#2501) | ||
- 在无法连接服务器时在报错信息中携带尝试连接的服务器 (#2576 by @cssxsh) | ||
- 修正文档细节 (#2547 by @7aGiven) | ||
|
||
## mirai-core-mock | ||
|
||
- 在 upload 后的 MockImage 中提供 size 属性 (#2515) | ||
|
||
## mirai-console | ||
|
||
### 新特性 | ||
|
||
- JvmPlugin 以 `getResource` 方法获取全局资源文件 (#2536 by @ArgonarioD) | ||
- 添加新事件 `StartupEvent`, `AutoLoginEvent` (#2446 by @cssxsh) | ||
|
||
### 优化和修复 | ||
|
||
- 文档修正(#2503 by @7aGiven, #2506 by @7aGiven, #2457 by @char-46, #2577 by @cssxsh, #2491 by @EnchStudio) | ||
- 修复在Android系统运行时,被杀后台时抛出的 InterruptedException 导致崩溃 (#2474 by @zhaodice) | ||
- 修复使用 Console 扩展时,对于扩展的函数返回非 null 值报错的情况 (#2528 by @NoMathExpectation) | ||
|
||
---------------------- | ||
|
||
## 扫码登录 (#2502) | ||
|
||
新的登录方法通过 `BotAuthorization` & `BotFactory.newBot(id: Long, authorization: BotAuthorization)` 登录 | ||
|
||
关于详细的使用方法请参考 `BotAuthorization` 的注释 | ||
|
||
扫码登录的实现不一定稳定 (因为涉及修改了大量内部登录和维护在线逻辑), 文档也还在正在准备中. | ||
**在 2.15.0-RC 可能会修改扫码登录的 API**. | ||
|
||
> mirai-console **尚未支持 | ||
**在命令中指定扫码登录, 但是提供了 `MiraiConsole.addBot(id: Long, authorization: BotAuthorization)` 用于扫码登录 |