Commit Graph

8331 Commits

Author SHA1 Message Date
slarkerino
3b8534468d
docs: 新增Abp.Mirai C#库 (#2594)
Abp.Mirai 库是针对于mirai-api-http进行了二次封装的模块,与 ABP vNext 框架深度集成。开发人员如果是基于 ABP vNext 框架开发项目,集成本模块以后,可以快速实现同mirai-api-http的对接
2023-03-25 14:06:55 +00:00
cssxsh
b37fe6c2ed
update: protocol ANDROID_WATCH 2.0.8 (#2592) 2023-03-24 19:10:13 +00:00
NoMathExpectation
cb603adbfc
[console] 支持使用 json 保存与读取 PluginDataPluginConfig (#2498)
* Supports PluginData store with json format.

* Reformat code.
2023-03-22 15:36:54 +00:00
sandtechnology
baf9ee4bf7
[core] Add missed refresh token logic for OnlinePush.SidTicketExpired (#2584) 2023-03-22 03:01:43 +00:00
Him188
4238d00407
[build] Set Kotlin compiler back to 1.8.10
(Mistake by dca39f9b60)
2023-03-21 23:12:21 +00:00
Him188
b9ee2a8931
[core] Commonize BotConfiguration, simplify MPP hierarchy: (#2583)
* [core] Commonize BotConfiguration, simplify MPP hierarchy:

Move platform specific API to `AbstractBotConfiguration`

* Updates docs for AbstractBotConfiguration

* Add @since for AbstractBotConfiguration

* Mark AbstractBotConfiguration as not stable for inheritance
2023-03-21 23:06:27 +00:00
Him188
dca39f9b60
[build] Resolve compiler warnings in buildSrc 2023-03-21 20:52:07 +00:00
Him188
c74e9d2858
[build] Make mirai-core AbstractTest public, and add dependsOnCoreJvmTest in buildSrc 2023-03-21 18:12:04 +00:00
Him188
77132eee41
[build] Use snapshot version from build index 2023-03-21 16:29:33 +00:00
Him188
e3891c0388
[build] Map illegal chars in branch names for snapshot versions 2023-03-21 15:19:21 +00:00
sandtechnology
7e20883a08
[core] Fix OnlinePush.SidTicketExpired logic (#2563)
* Fix OnlinePush.SidTicketExpired logic

* Add missed responseCommandName
2023-03-21 15:00:26 +00:00
米可绫夏
fe649726f3
[docs] 完善了用户文档部分的内容 (#2541)
* 对 README 做了一丢丢改动

把用户和开发者部分的索引分开以便用户区分
调整了一点点细节

* 完善用户手册

补充了简单易懂的安装教程

* 规范 README 文档语法

* Apply suggestions from code review

Co-authored-by: Yurinann <1713574450@qq.com>
Co-authored-by: Him188 <Him188@mamoe.net>

* 规范了用户手册的文档内容

* 订正了一个空格错误

* 订正一个语法错误

* Update docs/UserManual.md

---------

Co-authored-by: Yurinann <1713574450@qq.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2023-03-21 14:57:36 +00:00
cssxsh
f4fa2cabf4
[core] feat: essence message setting (#2314)
* feat: remove essence message

* feat: Essences

* add: share and remove

* fix: impl

* fix: arguments

* feat: image url to image

* add: doc

* fix: doc

* Copyright: 2023

* remove: method removeEssenceMessage

* feat: lazy load source

* add: no parse

* add: sendAndExpect try

* fix: remove throw

* fix: parse IMAGE_MD5_REGEX
2023-03-21 14:53:23 +00:00
cssxsh
c016b822e7
[core] 修复群公告查询已阅读人员列表只能获取前 50 个的问题 (#2530) 2023-03-21 14:45:42 +00:00
sandtechnology
28b1032acd
[core] Handle rare case on packet pipeline (#2450)
* Handle rare case on packet pipeline
Fix #2449, should help #1603

* Fix and improve tips and improve the readability of code

* Improve wording of tips

Co-authored-by: Him188 <Him188@mamoe.net>

* Change d2Key error type to PROTOCOL_UPDATED

* Reformat code

---------

Co-authored-by: Him188 <Him188@mamoe.net>
2023-03-21 14:43:48 +00:00
Him188
403380514a
[core] 更新 MiraiProtocol 注释, 注明 ANDROID_WATCH 不支持戳一戳, 删除 ANDROID_PAD 的错误注释 (#2572) 2023-03-21 14:01:46 +00:00
7aGiven
c0dbb59e99
[docs] 在文档注释手表协议不支持戳一戳事件 (#2572) 2023-03-21 14:00:29 +00:00
NoMathExpectation
64f80949ac
Fixed message sending ignoring modifies via MessagePreSendEvent. (#2525) 2023-03-21 13:10:47 +00:00
Him188
50a24582a7
[build] Run snapshot publishing jobs only in mamoe/mirai. Fix #2580 2023-03-19 16:27:51 +00:00
Him188
9b86d3be8f
[build] Encode URL parts to escape HTML chars for build-index 2023-03-19 15:03:23 +00:00
Him188
43b5e710ef
[mock] Fix mockUploadAudio always throws ISE, part of #2548 2023-03-19 12:28:35 +00:00
Him188
db3a0ad24a
[mock] Filter files for MockAbsoluteFolder.resolveFiles, part of #2548 2023-03-19 12:24:06 +00:00
Him188
9e5b282ee6
Add release note for 2.15.0-M1 2023-03-19 12:01:42 +00:00
Him188
427c37e649
[build] Update to Kotlin 1.8.10 2023-03-19 03:18:34 +00:00
StageGuard
78d0b4fd54
QRCode login support & Introduce new authorization factory (#2502)
* [core] process `wtlogin.trans_emp` to support qrcode login

* [core] fix `wtlogin.trans_emp` protocol

* [core] optimize QRCodeLoginProcessor logic

* [core] fix `wtlogin.trans_emp` outgoing packet

* [core] cancel login when logging a bot which is inconsistent from bot factory

* [core] ignore `flag3` check on ANDROID_WATCH & name `flag1` and `flag2`

* [core] provide default `QRCodeLoginListener` for jvm

* [core] don't catch IllegalStateException in QRCodeLoginProcessor

* [core] Use `LoginSolver.createQRCodeLoginListener()` instead of property; Rename configuration name

* [core] Code improvement

* [core] remove qrcode state lock

* [core] ignore `flag3` when command is `wtlogin.trans_emp` in packet codec

* [core] enable qrcode login for macos

* [core] remove debug property in log

* [core] reformat code

* [core] rename `TransEmpResponse` to `Response`

* [core] assert `flag3Exception` not null first

* [core] remove arg client

* [core] update qrcode login notes

* [core] set custom qrcode size

* [core] Draft BotAuthorization

* [core] make SecretsProtection mpp

* [core] BotAuthorization.byXXX

* [core] Move QRCodeLoginListener to `.auth`

* [core] Protect data of BotAccount

* [core] Add SelectorRequireReconnectException

* [core] Implementation of BotAuthorization

* Revert changes of BotConfiguration

* api dump

* [core] remove passwordMd5 in `BotAccount`

* [mock] Add new bot factory function to mock bot factory

* Delete LoginCommandTest

* [core] Improve QRCode render

* [core] Introduce UnsupportedCaptchaMethodException & UnsupportedQRCodeCaptchaException

* api dump

* update docs

* [core] update `DebugRunHelper`

* [core] add simple block for BotAuthorization

* api dump

* Rename `canDoQRLogin` to `supportsQRLogin`, and specify argument names for MiraiProtocolInternal

* Remove `phoneNumber` parameter from BotAccount

* Make `BotAccount.<init>` with String password parameter TestOnly

* Rename `InconsistentBotException` to `InconsistentBotIdException`

* Rename `QRCodeLoginListener.onStatusChanged` to `QRCodeLoginListener.onStateChanged`

* Rename `BotAuthorizationResult` to `BotAuthResult`

* Rename BotAuthComponent, move internal APIs to internal module

* Logic fixup

* doc update

* QRCodeLoginListener.qrCodeStateUpdateInterval & onIntervalLoop

* console login with BotAuthorization

* update testing

* Update mirai-core-api/src/jvmMain/kotlin/utils/LoginSolver.jvm.kt

* Move AuthControl outside SsoProcessor

* Redesign auth

* Add initialTicket to producerCoroutine

* Revert protocol changes of MACOS

* Fix latch death locking

* Fix CoroutineOnDemandValueScope.receiveOrNull exceptional finish

* Fix exception collecting

* Fix DefaultBotAuthorizationFactory loading

* [core] qrcode login for IPAD protocol

* Revert "[core] qrcode login for IPAD protocol"

This reverts commit c1136a8798.

---------

Co-authored-by: Karlatemp <kar@kasukusakura.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2023-03-18 13:52:31 +00:00
cssxsh
e5ff458a5d
fix: address as NettyChannelException message (#2576)
* fix: address as NettyChannelException message

* fix: message
2023-03-16 22:23:42 +08:00
cssxsh
ba03bd472c
typo: 群参数说明 (#2577) 2023-03-16 17:31:27 +08:00
cssxsh
b6b1059107
update: MiraiProtocol IPAD MACOS (#2575) 2023-03-15 14:15:34 +00:00
ArgonarioD
4f0f733f4d
修复JvmPlugin无法通过自己的classLoader以getResource的方法获取全局依赖的class文件 (#2536)
* [console] Fixed classLoaders of JvmPlugin cannot getResource(classes of global dependencies), fix #2535

* [core/utils/jvm] new fun: addAll(Enumeration)

* [console] modify DynLibClassLoader.tryFastOrStrictResolveResource to tryFastOrStrictResolveResources

* [console] remove allClassesAsResources field

* [console] add var to control whether class files of mirai dependencies could be load as resources

* [console/integration-test] modify loader test

* [console] dump new apis

* [console] rename JvmPluginClasspath.openMiraiDependenciesClassResource and standardize its KDoc

* [console] modify the KDoc of JvmPluginClasspath.shouldResolveConsoleSystemResource

* [console/integration-test] improve resources loading test cases

* [console/integration-test] modify assert to assertTrue
2023-03-12 22:37:47 +08:00
Eritque arcus
3ff2737b3c
Add fallback solution for Services (#2511)
* add fallback solution for Services

* use castUp

* throw exception when prop doesn't match

* cannot use castUp

* improve codes

* improve name of functions

* add both

* add override

* solve conflicts

* [core] Move MiraiCoreServices to common

* [core] Improvement

* update var names

* update func names

---------

Co-authored-by: Karlatemp <kar@kasukusakura.com>
2023-03-11 18:12:56 +08:00
ヒューマンワーキン
2f154b6807
[core] 增加 TxCaptchaHelper 可用性无法保证的警告 (#2564)
* Update LoginSolver.jvm.kt

* revert
2023-03-10 20:00:23 +00:00
ヒューマンワーキン
a0d9047b7b
修复 dumpTlvMap 不正确的返回值 (#2557)
* 修复 dumpTlvMap 不正确的返回值

* Update WtLogin.kt

* Update WtLogin.kt

注意力涣散.jpg
2023-03-08 11:58:24 +00:00
sandtechnology
01d2851af1
Update android protocol version (#2551)
Thanks to MiraiGo.
Fixes #2545,#2492,#2453
2023-03-07 12:15:20 +00:00
7aGiven
1e4250a125
修改BotNudgedEvent为NudgeEvent (#2547) 2023-03-05 10:57:26 +00:00
赵怡然
cb78ed34a5
[console] 修复在Android系统运行时,被杀后台时抛出的 InterruptedException 导致崩溃 (#2474)
* 修复在Android系统运行时,被杀后台时抛出的 InterruptedException 导致崩溃

* Update mirai-console/backend/mirai-console/src/MiraiConsoleImplementation.kt

Co-authored-by: Him188 <Him188@mamoe.net>

---------

Co-authored-by: Him188 <Him188@mamoe.net>
2023-03-01 17:57:57 +00:00
NoMathExpectation
a6afd9540c
[console] Fixed reaching UNREACHABLE_CLAUSE when running extensions with non-null function results. (#2528) 2023-02-24 02:15:43 +00:00
Him188
48d674b383
[build] Actions v3 (#2518)
* [build] Update to `actions/checkout@v3` and `actions/setup-java@v3`

* v3
2023-02-20 23:56:20 +00:00
Karlatemp
3ba53ee4c2
[mock] Update tests 2023-02-20 22:09:43 +08:00
Karlatemp
4d9f6e88f9
[core] Fix polymorphic serialization 2023-02-20 22:09:39 +08:00
Him188
1acf51e308
Update copyright in README and code template to 2023 2023-02-20 11:04:07 +00:00
cssxsh
bec756e0bf
[core] fix: announcements cookie (#2512) 2023-02-19 11:50:02 +00:00
sandtechnology
f4667fe1ef
[core] Handle TimeoutCancellationException when resuming connection. Fix #2504, fix #2488 (#2505)
* #2504,#2488 handle TimeoutCancellationException when resuming connection

* Remove unnecessary code and fix wording

* Use yield() instead of delay

* Use yield() instead of delay
2023-02-19 11:49:41 +00:00
cssxsh
38e03fdc00
[console] Add StartupEvent and AutoLoginEvent (#2446)
* add: console event impl

* add: internal annotation

* add: since 2.15
2023-02-19 11:48:28 +00:00
Him188
26a3ddd505
[core] Improve docs on queryProfile, close #2460 2023-02-19 11:46:35 +00:00
Him188
5cad8aad8d
[docs] Fix reference to images in docs/UsingSnapshots.md 2023-02-19 11:43:35 +00:00
Him188
f6dc4c6b55
[build] 使用自增序号作为预览版本号 (#2516)
* [build] Use numerical build index numbers for snapshot versions

* use warning

* Use same index for all machines

* fix get

* different indexes for branches

* add docs
2023-02-18 23:22:03 +00:00
Eritque arcus
cc22174e64
[mock] add size into MockImage (#2515) 2023-02-18 20:32:21 +00:00
cssxsh
9f36eff070
[core] Support loading service from classloaders other than current (#2428)
* fix: load service, close #2268 #2427

* fix: check empty
2023-02-17 09:57:12 +00:00
Karlatemp
e686a23f40
[core] Fix offline message source quote replying; fix #2501 2023-02-16 23:06:23 +08:00
7aGiven
d8ef9ad282
修改执行指令部分 (#2506)
将PluginManager修改为CommandManager
2023-02-16 02:52:06 +00:00