Him188
137e1a1235
Fix network scopes and exception handling. Support recovering after system hibernation and network failure.
2021-06-05 16:05:41 +08:00
Him188
a781941ede
Fix LateinitMutableProperty
2021-06-05 16:05:41 +08:00
Him188
e788aa09f7
Add awaitStateChange
2021-06-05 16:05:41 +08:00
Him188
bcdff1336b
Kotlin 1.5 and dependencies updates ( #1246 )
...
* Kotlin 1.5 and dependencies updates
* Update mirai-console ref
* Use Kotlin 1.5.10
* 2.7-M1-dev-3
* Update console ref
2021-05-27 14:39:13 +08:00
Him188
5e25c0e25b
Remove bintray
2021-05-25 12:25:53 +08:00
Him188
f7f4ccf4f5
Correct state transition logic:
...
- Linear lifecycle for NetworkHandler: no chance to change state back to previous ones
- No reconnection attempts in NetworkHandler but in NHSelector
- Ensure clashing checks performed in setState
- Print closure exception in TestNettyNH.setStateOK
2021-05-09 21:05:32 +08:00
Him188
d43a77b590
Update docs and improve source code readability
2021-05-09 15:31:50 +08:00
Him188
a62c570205
Add ExceptionCollector.throwLast
2021-05-09 13:12:33 +08:00
Him188
b53e546743
Prototype EventDispatcher
2021-05-09 00:54:48 +08:00
Him188
971685a2b0
Fix state resume
2021-05-09 00:54:48 +08:00
Him188
95d634233c
Close bot if first login failed
2021-05-09 00:54:48 +08:00
Him188
062492c546
Test: NettyEndlessReconnectionTest
2021-05-09 00:54:48 +08:00
Him188
29cb81ad64
Test: ExceptionCollectorTest
2021-05-09 00:54:48 +08:00
Him188
8db8e2fb03
Implement lifecycle management for network
2021-05-09 00:54:48 +08:00
Him188
f9ddf74d8e
Extract sync logic
2021-05-09 00:54:48 +08:00
Him188
b91bbfd2b8
Add NetworkHandlerFactory and tests for NetworkHandler
2021-05-09 00:54:48 +08:00
Him188
35b80dc700
Processors
2021-05-09 00:54:48 +08:00
Him188
840dd19dd0
Move EMPTY_BYTE_ARRAY to mirai-core-utils
2021-05-09 00:54:48 +08:00
Him188
d01f71ff8b
Remove rubbish; fix build; add todos
2021-05-09 00:54:48 +08:00
Him188
b844efb072
New network: framework infrastructure
2021-05-09 00:54:48 +08:00
Him188
48564056df
Add AtomicLazy
2021-05-09 00:54:48 +08:00
sandtechnology
db4c41f84a
Rework seq system ( #1230 )
...
* Rework seq system, should help #1209
* Use non-blocking (CAS) implement
* Making next seq code more clear for reading
* Fix mistake
2021-05-02 13:50:24 +08:00
Him188
70dc0a4da6
Remove kotlin.time.Duration usages ( #1215 )
...
* Remove kotlin.Duration usages
* Fix build
* update submodule console ref
2021-04-27 11:49:30 +08:00
AdoptOSS
09475efbda
fix: serialization plugin should not be put into runtime classpath ( #1197 )
2021-04-17 19:56:19 +08:00
Him188
f3d3130f2d
Support login cache and login without password. close #1158
2021-04-10 18:46:39 +08:00
AdoptOSS
21e8852e0f
buildscript: fix task not found errors when android sdk not available ( #1161 )
...
* buildscript: fix task not found errors when android sdk not available
* fix: this shadowed by run
* cleanup: code style
* improve: avoid breaking index map
2021-04-05 22:35:38 +08:00
Him188
36742a867f
Add util function systemProp
2021-04-03 23:06:15 +08:00
Him188
0f41c225f9
Move SerialDescriptor.copy to mirai-core-utils
2021-03-26 20:42:51 +08:00
Karlatemp
f9353b6aef
Compiled code verify ( #1080 )
...
* Compiled code verify
* Run `verifyCompiledClasses` in `check` task
* Redesign verification
Co-authored-by: Bo Zhang <bo@gradle.com>
* Disable console verify
* Decoupling
Co-authored-by: Bo Zhang <bo@gradle.com>
2021-03-20 13:34:04 +08:00
Him188
e256ec06d3
Support file operations ( #1069 )
...
* Proto structs for group file
* RemoteFile fundamental abstraction and proto structs
* Configure JVM target for mirai-console-intellij
* Add Group.filesRoot
* Fix build
* Implement a FileSystem for RemoteFile resolution
* Fix RemoteFile FileSystem and implement resolve and listFiles
* Implement file info query and file download
* Support uploading group file
* Support file feeds
* 2.5-M2-dev-1
* Fix tests
* 2.5-M2-dev-2
* Add uuid-based resolving, support getting file details
* Support FileMessage receive
* Support sending FileMessage
* 2.5-M2-dev-3
* Add DownloadInfo.id
* Improve RemoteFile.delete
* Support move, delete, rename, mkdir. Simplify listFiles
* - Rename RemoteFile.write to .upload.
- Prefer id matching
- Improve move
* Add permission checks
* Improve permission checks
* Rearrange functions and add constant ROOT_PATH
* Introduce FileSupported, add extensions
* Introduce ProgressionCallback
* Fix docs and uploadFileAndSend
* Remove empty FileHighway.kt
* Add test testNormalize
* Add RemoteFile.contact, change RemoteFile.uploadAndSend return type to MessageReceipt
* Move @JvmBlockingBridge to file
* Change FileMessage.toRemoteFile parameter type Group to FileSupported
* Add impl notes #1082
2021-03-08 18:34:45 +08:00
Him188
f010b1150c
Fix platform declarations in mirai-core-utils
2021-02-25 09:41:05 +08:00
Him188
2c14f0016f
Disable atomicFU compiler plugin
2021-02-25 09:35:51 +08:00
Karlatemp
7a7c88b783
Android api level check
2021-02-25 00:12:58 +08:00
Him188
d3583162a5
Replace usage of List.replaceAll with Kotlin's
2021-02-24 15:15:31 +08:00
Him188
0b971b2117
Merge branch 'dev' into android_target
...
# Conflicts:
# build.gradle.kts
# buildSrc/src/main/kotlin/Versions.kt
2021-02-24 09:20:47 +08:00
Him188
cda6aaa79b
Simplify cache configuration.
...
Improve cache saving:
- Use ProtoBuf to serialize BdhSession
- More readable servers.json
2021-02-10 15:20:39 +08:00
Him188
90d4030fe6
Support friend list cache, close #408
2021-02-06 22:52:41 +08:00
Him188
1768872bab
Rewrite message to struct conversions, add ReceiveMessageTransformer, for parsing long and forward messages in the future
2021-02-03 08:09:57 +08:00
Him188
bacfef584f
Add android compilation target
2021-02-01 12:23:28 +08:00
Karlatemp
db5e54507a
Fix image id conversion; fix #933
...
Signed-off-by: Karlatemp <karlatemp@vip.qq.com>
2021-01-31 14:27:10 +08:00
Him188
525d7c8de3
Do not publish jvm artifacts in root module, fix unresolved dependency with Android. fix #897
2021-01-27 13:57:32 +08:00
Him188
d8b1505181
Highway big data channel ( #917 )
...
- Fix retryWithServers exception suppress
- ConfigPush BDH session
- ConfigPush SSO change server
- Upload group PTT silk, #577
- Support upload private image through highway, close #194 ;
- Add fallback strategies for uploading group voice #577 and private image #916
- Upload all resources through highway BDH
- Support concurrent uploading
- Add BotConfiguration.highwayUploadCoroutineCount
close #916 , close #577 , close #194
2021-01-26 19:08:01 +08:00
Him188
8ad0b91974
Fix blocking calls in suspend contexts
2021-01-26 13:38:23 +08:00
Him188
988794343b
Improve buildscript, fix publication
2021-01-21 10:08:21 +08:00
Him188
7dd7f48994
Don't catch Error while reconnecting and sending packet, fix #824
2021-01-08 12:03:42 +08:00
Him188
faece77942
[Review] Rearrange utilities
2021-01-06 16:09:44 +08:00
Him188
382d3d08d4
[Review] Move WeakRef to mirai-core-utils
2021-01-06 15:13:15 +08:00
Him188
1d24a810fe
Unify image id
2021-01-05 23:28:34 +08:00
Him188
767eb75d4e
Move Http client from MiraiPlatformUtils to IMirai.Http
...
Delete MiraiPlatformUtils
Add timeout configuration for ktor HttpClient, fix #673
2021-01-05 20:43:04 +08:00
Him188
d5cdd9e161
Improve file type detecting
2021-01-05 20:35:10 +08:00