Commit Graph

7579 Commits

Author SHA1 Message Date
Karlatemp
a4b62b0909
Voice serialization (#1368)
* Voice serialization

* Implement `hashCode` and `equals` for `Voice`

* Update test

* Update test

* Add note of `PttMessage.pttInternalInstance`

* Fix logic of `Voice.equals`
2021-07-02 12:10:20 +08:00
Karlatemp
1ad00134fa
Update UserManual.md 2021-07-02 12:07:09 +08:00
Him188
db0de14f0b Update console ref 2021-07-02 02:07:57 +08:00
Him188
1a8f51a203 Update idea dependencies 2021-07-02 02:07:07 +08:00
Him188
67565cb34b Fix build 2021-07-02 02:06:53 +08:00
Him188
823193f1bb Update gradle-intellij-plugin to 1.1 2021-07-02 01:44:57 +08:00
Him188
d8023fd82f Fix build 2021-07-02 01:44:42 +08:00
Him188
986c423021 Fix build 2021-07-02 01:19:16 +08:00
Him188
5aae46218f Do not throw exception from PacketCodec but log with CoroutineExceptionHandler 2021-07-02 01:18:40 +08:00
Him188
b90f86258c Add property recoverable to HeartbeatFailedException, to control recoverability.
Fix `SelectorRecoveryTest`
2021-07-02 01:18:40 +08:00
Him188
213b1c1e3f Update copyright 2021-07-02 00:56:54 +08:00
Him188
f096d0d042 Reformat and cleanup code 2021-07-02 00:56:54 +08:00
Him188
f341d2f1f6 Update editorconfig from mirai-core 2021-07-02 00:56:54 +08:00
Him188
8799d653e6 Add .editorconfig for an unified style, use official Kotlin code style 2021-07-02 00:39:10 +08:00
Him188
adc39a93b5 Update copyright 2021-07-02 00:39:10 +08:00
Him188
b9eb654a51 Reformat and cleanup code 2021-07-02 00:39:10 +08:00
Him188
d114d0a2e6 Optimize BotInitProcessor and add tests 2021-07-02 00:39:10 +08:00
Him188
b78c276aef ChunkedFlowSession: Ensure channel is closed on completion 2021-07-02 00:39:10 +08:00
Him188
fa9d236949 Avoid using TopLevel logger in tests 2021-07-02 00:39:10 +08:00
Him188
f379a617fd NetworkHandlerSupport: catch all exceptions in coroutine scope and direct it to network logger 2021-07-02 00:39:10 +08:00
Him188
6012f33574 Add selector logging, helps #1361 2021-07-02 00:39:10 +08:00
Him188
4d3a9e7cc5 Add SynchronizedStdoutLogger for tests 2021-07-01 11:06:58 +08:00
Him188
0d339c7303 Remove redundant suspension in BotOfflineEventMonitorImpl 2021-06-30 23:01:42 +08:00
Him188
e10155a7b3 AbstractKeepAliveNetworkHandlerSelector do not yield() but check for cancellation manually. 2021-06-30 23:01:22 +08:00
Him188
c4d129542f Unwrap CancellationException on JobAttachStateObserver.stateChanged0 2021-06-29 23:10:06 +08:00
Him188
5d57c33789 Improve Throwable.unwrap: add the unwrapped-out exception to suppressed exceptions to avoid loss of debugging information 2021-06-29 23:10:06 +08:00
Him188
f1bb7c566f Add generic type to SelectorNetworkHandler, improve test framework:
- Make `AbstractRealNetworkHandlerTest` sealed with subtypes;
  - `AbstractNettyNHTest`
  - `AbstractNettyNHTestWithSelector`
- Set `mirai.event.launch.undispatched` to `true` for network tests
- Use real `BotOfflineEventMonitor` in tests with selector
2021-06-29 22:47:56 +08:00
Him188
6eff4bdf40 Add EVENT_LAUNCH_UNDISPATCHED to allow to launch coroutines for event listeners in a UNDISPATCHED start mode 2021-06-29 22:43:02 +08:00
Him188
3d0fba2d8f Fix EventChannel.filter, allow blocking calls correctly 2021-06-29 22:21:58 +08:00
sandtechnology
2ce549e56f
Fix #1322, remove redundant cookie (#1372)
* Fix #1322, removed useless parms

* Add missed perms

* Remove redundant cookie
2021-06-28 19:19:18 +08:00
cssxsh
3628d534d4
fix: builtins config use ReadOnlyPluginConfig (#375) 2021-06-26 20:26:37 +08:00
Karlatemp
34eff89786
Update CONTRIBUTING.md 2021-06-26 20:11:55 +08:00
Karlatemp
06e4d37a9f
Fix build 2021-06-26 19:45:01 +08:00
Karlatemp
06c005e068
Update document link of captcha solving 2021-06-26 19:31:30 +08:00
Karlatemp
a20833bb2a
Enable slider captcha for built-in login solvers 2021-06-26 19:31:28 +08:00
Karlatemp
eb5c7414d7
Add hashCode and equals for Image, close #1302 2021-06-26 16:29:40 +08:00
Karlatemp
f7170f2052
Delete unused internal AbstractImage 2021-06-26 16:17:53 +08:00
Karlatemp
ae54a5fb41
Private voice support (#1310)
* Support voice for private messaging

* typo

* Add extension functions for `uploadAsVoice`; Update KDocs

* Update KDoc

* Update error message

* Fix `C2CPttStoreBDH` error

* Deprecated `ExternalResource.uploadAsVoice(Contact): Voice`

* Update mirai-core-api/src/commonMain/kotlin/utils/ExternalResource.kt

* apiDump

Co-authored-by: Him188 <Him188@mamoe.net>
2021-06-26 10:02:23 +08:00
sandtechnology
d349c19c2e
StatSvc.SimpleGet: Decode the resp (#1241)
* StatSvc.SimpleGet: Decode the resp

* Close network on `StatSvc.SimpleGet.Response.Error`

* Use new `IncomingPacket`

Co-authored-by: Him188 <Him188@mamoe.net>
2021-06-25 20:29:28 +08:00
Him188
abb28ee6d2 Improve performance of Either.fold, Either.mapLeft and Either.mapRight 2021-06-25 20:16:59 +08:00
Him188
ce4373a322 Use Either for IncomingPacket.result 2021-06-25 20:11:41 +08:00
Him188
11ffb324c9 Add Either 2021-06-25 20:05:28 +08:00
Him188
32ac910538 Update CONTRIBUTING.md 2021-06-25 18:01:49 +08:00
Him188
35820ed50b
Create README.md 2021-06-25 16:31:10 +08:00
Him188
baf1ca618e Improve performance of MessageChain.get, MessageChain.contains. Add relevant tests. 2021-06-25 07:57:52 +08:00
Him188
850fcd0afe Fix build 2021-06-24 01:19:49 +08:00
Him188
d534bbcb48 Remove GRADLE_METADATA 2021-06-24 01:14:04 +08:00
Him188
45987030b9 Gradle 7.1 2021-06-24 01:11:25 +08:00
Him188
a518037585 Gradle 7.1 2021-06-24 01:10:53 +08:00
Him188
b02fa15b33 Broadcast BotReloginEvent stably 2021-06-24 01:04:39 +08:00