Commit Graph

7836 Commits

Author SHA1 Message Date
Him188
f83d20bed9 Enable EventLaunchUndispatchedTest 2022-05-16 19:14:14 +01:00
Him188
e0140c6272 Remove useless sub test in NettyHandlerEventTest 2022-05-16 19:14:14 +01:00
Him188
c7ff26ab19 Assign different bot ids for each test bot instance 2022-05-16 19:14:14 +01:00
Him188
5deee909a9 StateObserver: Make beforeStateResume and afterStateResume suspend 2022-05-16 19:14:14 +01:00
Him188
bdf125e26d Broadcast BotOfflineEvent async and ensure joinBroadcast works for it 2022-05-16 19:14:14 +01:00
Him188
da65f4d86d Run login recovery in EventDispatcher's scope 2022-05-16 19:14:14 +01:00
Him188
baf6c35e46 Wait async connector in SelectorRecoveryTest 2022-05-16 19:14:14 +01:00
Him188
ac1fc887c5 Close test bot instance after each test 2022-05-16 19:14:14 +01:00
Him188
8ac5b2d8c0 Do not set mirai.event.trace by default 2022-05-16 19:14:14 +01:00
Him188
4e57c21646 SingleEntrantLock: use reference comparison 2022-05-16 19:14:14 +01:00
Him188
1c7e3bc5a1 Revise exception handling in NetworkHandler, involving:
- HeartbeatProcessor
- HeartbeatFailedException: IOException is not recoverable, since this is not even thrown
2022-05-16 19:14:14 +01:00
Him188
2f40d3f432 Deprecate EventDisabled for ERROR 2022-05-16 19:14:14 +01:00
Him188
0c809f4e4c Remove internal EventBroadcast, code cleanup 2022-05-16 19:14:14 +01:00
Him188
1d2ae12196 Log events properly in EventChannelImpl 2022-05-16 19:14:14 +01:00
Him188
4c28913a27 Migrate use of GlobalEventChannels in tests to use scoped ones 2022-05-16 19:14:14 +01:00
Him188
c61a79e299 Add trace logging for event listener, with system property mirai.event.trace 2022-05-16 19:14:14 +01:00
Him188
a7dae90b4c Add Run Configuration 'Run core tests' 2022-05-16 19:14:14 +01:00
Him188
497d9ff810 Update docs for Event, EventChannel, and Listener 2022-05-16 19:14:14 +01:00
Him188
c391d3f886 Refine nextEvent and syncFromEvent: handle exceptions correctly 2022-05-16 19:14:14 +01:00
Him188
30dbd1b1c2 Pass exceptions caught in subscriber context to subscriber only 2022-05-16 19:14:14 +01:00
Him188
c192047361 Move event implementations to EventDispatcher and add EventChannel.asFlow. 2022-05-16 19:14:14 +01:00
ryoii
bc8fea2195
Fix AbsoluteFolder.resolveFileById for recursive (#2033)
```kotlin
@Test
    fun testFirst() {
        val f = { a: Int ->
            if (a > 0) a
            else null
        }

        val a = listOf<Int>(-1, -2, -1, -1)
        
        assertEquals(
            a.map{ f(it) }.firstOrNull(),
            null
        )
    }
```
2022-05-15 18:48:52 +01:00
cssxsh
c6b47a3231
Fix MarketFace contentToString, return '[商城表情]' if original name is empty (#2030) 2022-05-14 11:14:36 +01:00
Him188
0d3bc9c684 Fix HB logic: catch TimeoutCancellationException from HB action and report it as non-fatal error. Fix #2024 2022-05-09 08:58:47 +01:00
Him188
71fb5585fe Update docs for NetworkHandler 2022-05-08 09:56:27 +01:00
Him188
0da75d31b9 Fix readStringListFromEnv when no env specified 2022-05-08 09:48:10 +01:00
TheFatCat
9d18d79d66
fix docs and add java example (#2021) 2022-05-07 07:36:12 +01:00
hundun
5f758d00e2
fix doc (#2019)
[skip ci]
2022-05-07 10:47:46 +08:00
Him188
b16b3a58ac sendAndExpect: complete the result of the listener with last exception only if it has not yet completed. Maybe fix #2006. 2022-05-06 15:51:44 +01:00
Him188
008398bd84
Update README.md 2022-05-06 14:47:17 +01:00
Karlatemp
cb3bba986c
Fix IMirai initialize; Fix #1861; Fix some error caused by d757764308 2022-05-06 17:47:22 +08:00
Karlatemp
78d0cdd155
Fix bom dependencies again; Fix #1975 2022-05-05 22:44:48 +08:00
Karlatemp
e3b372e643
Fix snapshot page uploading 2022-05-04 17:22:52 +08:00
Karlatemp
784c78a010
Move UpdateSnapshotPage up buildSrc 2022-05-04 16:55:53 +08:00
Karlatemp
8250c3da65
Using PlatformClassLoader to resolve java.*; fix #2009 2022-05-04 16:36:13 +08:00
cssxsh
edf7622b0b
fix: ContactOrBot.render (#2010) 2022-05-04 16:28:14 +08:00
Him188
400710d0cc
Update UserManual.md 2022-05-03 12:44:11 +01:00
Him188
4fa853065c Add BotConfiguration.disableAccountSecretes 2022-05-02 14:01:53 +01:00
Karlatemp
115c987c2d
[skip ci] Fix documents building 2022-05-02 19:31:02 +08:00
Him188
a7633cc327 Set version to 2.12.0 2022-05-02 11:20:44 +01:00
Him188
3a4a8d01a3 Fix test can auto log 2022-05-02 11:20:23 +01:00
Him188
61d68c245d Refine docs examples 2022-05-02 11:16:24 +01:00
Him188
8c9d2e4707 添加插件文档 "使用日志" 2022-05-02 11:14:23 +01:00
Him188
54eb4387e4 Make log4j.Logger.asMiraiLogger and useLog4j2 stable 2022-05-02 11:13:55 +01:00
Him188
ce3cbbf771 Fix docs reference to mirai-console-intellij on JB plugins 2022-05-02 10:37:30 +01:00
Him188
2a417445a7 Invalidate account.secretes on failure to lo in 2022-05-02 10:15:02 +01:00
Him188
ed37609731 Fix TarsInput, fix #1998 2022-05-02 09:59:51 +01:00
Him188
7a6c7a89c0
Update docs for console plugin (#1995)
* Update docs for console plugin

* Update [skip ci]

* Update docs

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2022-05-01 18:03:10 +01:00
Him188
6b5f9e2eef Change file suffix of new plugins to '.mirai2.jar'. Ignore '.mirai.jar' if its '.mirai2.jar' counterparts loaded. Close #1999 2022-05-01 17:59:05 +01:00
xtexChooser
cb08f4789c
buildscript: remove unused codes (#2000) 2022-04-30 14:03:39 +01:00