Him188
3c580eead4
[core] Add default implementation for RoamingMessages.getMessagesStream
2023-01-05 02:33:27 +00:00
cssxsh
2cffb7a4a4
[core] feat: RockPaperScissors ( #2220 )
...
* [core] feat: RockPaperScissors
Co-authored-by: Karlatemp <kar@kasukusakura.com>
* docs update
* rename `eliminate` to `eliminates`
Co-authored-by: Karlatemp <kar@kasukusakura.com>
2023-01-03 10:00:32 +08:00
微莹·纤绫
553ea9abbc
[core] Introduce CacheValidator for validating caches ( #2388 )
...
* [core] Export DeviceInfo.serializer() to mirai-core
* [core] Introduce CacheValidator for validating caches
2023-01-02 15:39:36 +00:00
Him188
6365e23f2c
[core] Change StdoutLogger color for WARNING. Fix #2336 .
...
Commit 28030dfb05
fixed this problem for PlatformLogger
2022-12-27 17:54:34 +00:00
Him188
7908edb57b
[core+console] Raise deprecation level for 2.14, API including:
...
- EventChannel.asChannel
- (internal) syncFromEventImpl
- EmptyMessageChain
- GroupEntranceAnnouncementChangeEvent
- MiraiConsole.createLogger
- SingletonExtensionPoint
2022-12-27 15:53:12 +00:00
Him188
76a70f596f
[core] Raise deprecation level for RemoteFile to ERROR (for v2.14)
2022-12-27 14:34:41 +00:00
Him188
6fc1482f69
[core] Relocate ktor-io in mirai-core-api. Fix #2381
2022-12-04 14:49:47 +00:00
ヒューマンワーキン
5a645b4e8e
修正 'contentToString` 注释不严谨处 ( #2374 )
...
* 修正 'contentToString` 注释不严谨处
* link `At`
2022-12-03 14:55:21 +00:00
Him188
28f198d03f
[core] Add QiaoMen
to PokeMessage.values
. Fix poke id of QiaoMen
. Close #2170 .
2022-11-27 20:20:45 +00:00
Him188
60bbcf6e2c
[core] Revert "Review atomic calls and enable atomicfu compiler. Close #2315 ", due to atomicfu does not behave correctly when mirai-console depends on mirai-core-utils. Fixes #2329 .
...
This commit reverts part of commit 564a7ce8f8
2022-11-27 20:08:21 +00:00
Him188
3360347ca2
[build] Fix dependency exclusion for builds when IDEA_ACTIVE
2022-11-27 15:25:18 +00:00
Him188
c0ccdbe9d3
[build] Rewrite shadow relocation
2022-11-27 15:25:18 +00:00
Karlatemp
28030dfb05
[core] [logging] Change message color of WARNING
& ERROR
; fix #2336
2022-11-09 22:57:10 +08:00
cssxsh
1c79da0f38
[core] feat: Announcement confirmed member api ( #2255 )
...
* feat: Announcement confirmed
* add: native
* add: todo
* fix: dump
2022-11-03 10:42:21 +00:00
微莹·纤绫
4abb3e3703
[core] Introduce Flow<T>.toStream()
for simply implement Streamable
( #2259 )
...
* [core] Introduce `Flow<T>.toStream()` for simply implement `Streamable`
* Drop `unintercepted` support
* fix ci
* update test
2022-10-31 13:09:58 +00:00
Him188
e47b205e0d
[core] Fix docs of examples on ExternalResource
2022-10-31 10:53:10 +00:00
Him188
9613c9b7e5
[core] Add more information on LIMITED_MESSAGING
2022-10-31 10:44:13 +00:00
Him188
573f08955c
[core] Show specific reason for error 46 while sending message. Close #2127
2022-10-31 10:41:06 +00:00
Him188
c59de206cb
[core] Add default implementation of deprecated LoginSolver.onSolveUnsafeDeviceLoginVerify
2022-10-31 09:58:28 +00:00
Him188
564a7ce8f8
[core] Review atomic calls and enable atomicfu compiler. Close #2315
2022-10-29 13:04:37 +01:00
cssxsh
9818c08054
[core] Add sign event ( #2217 )
...
* add: SignEvent
* add: SignEvent
* add: hasRank
* add: api dump
* add: toString
* add: toString
* fix: sign for review
2022-10-29 11:11:20 +01:00
Him188
36cd688382
[core] Improve documentation for Group files
2022-10-28 14:42:28 +01:00
Him188
25e66d19c7
[core] Filter out relocated ktor dependencies in runtime except for mirai-core-utils and mirai-core-all. Fix #2291
2022-10-21 16:09:27 +01:00
Him188
eab14647e1
[core] Fix ArrayIndexOutOfBoundsException when loading device infos generated by < 2.9.0. Fix #2280
2022-10-19 16:19:34 +01:00
Him188
4595f937e4
[core] Add MessageChain.deserializeFromMiraiCode
without redundant receiver MessageChain
.
2022-10-14 16:00:31 +01:00
Him188
73293251d1
[core] Improve docs for messages
2022-10-13 15:35:34 +01:00
Him188
3b5ced4328
[core] Improve exception thrown by MessageChain.recall
and .recallIn
: add tips
2022-10-13 15:35:24 +01:00
Him188
16609fb1e0
[core] Introduce Streamable
for simplified multiplatform asFlow
a… ( #2256 )
...
* [core] Introduce `Streamable` for simplified multiplatform `asFlow` and `asStream`. Make `Announcements.asFlow` not suspend.
* Remove `@JvmBlockingBridge` in native
2022-09-25 23:44:18 +08:00
Him188
d1273401f6
[core] Remove dependency kotlinx-coroutines-jdk8
from mirai-core-api
2022-09-23 21:38:07 +08:00
Him188
9122dddfb7
[core] Add net.mamoe.mirai.utils.Closeable
for MPP use
2022-09-23 21:38:06 +08:00
Him188
b360f58c2b
[core] Make ExternalResource.input
an internal API. helps #2254
2022-09-23 21:38:06 +08:00
cssxsh
d000f2ea0f
[core] add group level api ( #2115 )
...
* add: api dump
* feat: Member.level
* add: api dump
* rename: level to rank
* feat: rank show
* feat: honor flag
* fix: honor flag index
* feat: record and chart
* feat: flag and docs
* add: api dump
* fix: active
* fix: honor
* fix: active
* fix: rebase
* fix: docs
* feat: MemberActive
* fix: for review
* feat: other notification
* remove: low level api
* add: since and api dump
* add: since
* for: review
* add: event sync
* fix: name and docs
* fix: api dump
* fix: for review
* add: ActiveRank, MemberMedal close #2233
* fix: active for review
* improve public API for inlined GroupHonorType
* Change `@since 2.13.0` to `@since 2.13`
* dump api changes
* implement mock framework for Active
* change `GroupActive.flush` to `GroupActive.refresh`
* improve docs for GroupActive
* remove unnecessary expect/actual for MemberActive
* change property names in GroupInfo
* check permission in MockGroupActiveImpl
* optimize member names in CommonGroupActiveImpl
* fix error checking
* dump api
Co-authored-by: Him188 <Him188@mamoe.net>
2022-09-21 23:18:50 +08:00
Him188
aa40f3f3d7
[core] fix since version of ExternalResource.input
2022-09-21 12:01:47 +08:00
Him188
d32a8a566c
[core] Use Java URL connection for TxCaptchaHelper.
...
^Fixes previous commit c804bbda13
2022-09-11 20:02:42 +08:00
Him188
c804bbda13
[core] Remove dependency on ktor-client for mirai-core-api. Fix duplicated class errors on Android, close #2248
2022-09-11 19:49:43 +08:00
Him188
eb89b6348d
[core] Support solving device verification request by SMS:
...
- close #2190 , helps #717
- deprecate `LoginSolver.onSolveUnsafeDeviceLoginVerify`, add `.onSolveDeviceVerification`
2022-09-11 19:41:16 +08:00
Him188
2eb2c3acd0
[core] Add default AbstractExternalResource.input
implementation
2022-09-09 18:43:29 +08:00
Karlatemp
5ac74a336f
Create module mirai-console-frontend-base
2022-09-06 18:21:37 +08:00
Karlatemp
969c77f146
[console] Change convention of createLoggerFactory()
2022-08-28 22:52:48 +08:00
Him188
f0651c81c6
[core+console] Improve logging hierarchy: ( #2196 )
...
- always use factory API from mirai-core
- Terminal is still overriding standard outputs
- plugins are forbidden to override logging framework (this was allowed but not working before)
2022-08-27 18:46:16 +08:00
Him188
2d393ee0b0
[core+console] Raise deprecation level for 2.13: ( #2213 )
...
- warningSince 2.11 -> errorSince 2.13
- errorSince 2.12 -> hiddenSince 2.13
- some experimental APIs removed
2022-08-27 14:06:03 +08:00
Eritque arcus
fea1d28488
[core] Support friend group ( #2113 )
...
* feat: support friend group
* remove unnecessary modifications
* toByteArray2
* support friendGroup, with api dump
* support rename, with api dump
* modify as required
* modify as required
* reverse
* doc
* FriendGroups
* api dump
* modify as required
* fix CI
* FriendGroup sync notice
* api dump
* modify as required
* immutable
* add friends: ContactList in FriendGroup
* more sync notice
* modify log content
* Change `FriendGroup.friends` to `Collection<Friend>`
* Fix `FriendGroup.friends.isEmpty()`
* modified as require, untested
* del count and online count in info
* change import
* fix missing import
* set @since 2.13 and modified as required
* modified as required
* modified as required
* doc
* change friendGroupId type to Int?
* api dumped
* change friendGroupId type to Int?
* introduce null to friendGroupId
* modified as required
* chore
* api dump
* chore: remark
* change int? to int
* api dump
* Update mirai-core-api/src/commonMain/kotlin/data/FriendGroups.kt
Co-authored-by: Him188 <Him188@mamoe.net>
* Move FriendGroup and FriendGroups to contact.friendgroup
* Make `Friend.friendGroup` not null
* add FriendGroups.default for default group
* Redesign FriendGroup interface
Co-authored-by: Karlatemp <kar@kasukusakura.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2022-08-26 16:56:09 +08:00
Him188
fb3f39e328
[core] Improve NetworkHandler exception handling and optimize exception logging:
...
- close #2175
- close #2148
- Fix `Throwable.findCause`
- Rename `mirai.network.handle.selector.logging` to `mirai.network.handler.selector.logging`
- Hide rather long and complicated `CancellationException`s, use `mirai.network.handler.cancellation.trace` to re-enable it
2022-08-26 15:20:04 +08:00
Eritque arcus
b4066ac6d1
NextEventAndIntercept and NextMessageAndIntercept ( #2177 )
...
* rewrote pr, no tested
* test and change param position
* enable ci
* finish test
* modified as required
* typo
2022-08-23 18:07:03 +08:00
Him188
a51f55124c
Mark ExternalResource.isAutoClose
, ExternalResource.useAutoClose
and ExternalResource.runAutoClose
stable
2022-08-16 10:26:45 +08:00
Him188
39074f1764
[build] Update to Kotlin 1.7.10:
...
Kotlin 1.7.10
kotlinx-serialization 1.3.3
kotlinx-coroutines 1.6.4
kotlinx-atomicfu 0.17.3
Ktor 2.1.0
2022-08-15 18:36:40 +08:00
Him188
9dd57de844
[core] Fix cache dir on native. part of #2160 .
2022-08-15 16:18:50 +08:00
Eritque arcus
6b8c054948
[core] Support change friend remark ( #2112 )
...
* feat: support ChangeFriendName
* fix: register factory
[skip ci]
* rebase dev
* kdoc?
* api dump
* kdoc
* rebase dev
* remove unnecessary modification
* info::remark -> info.remark
* rebase dev
* api dump
* try to fix CI
* Add `@since` for `Friend.remark` setter
Co-authored-by: Him188 <Him188@mamoe.net>
2022-08-14 10:15:42 +08:00
Him188
f96c156d82
[core] Implement ConstrainSingle
for Audio
( fix #2093 )
2022-08-12 09:14:16 +08:00
cssxsh
9db5d2c4b5
Add client properties to MessageSyncEvents, add OtherClientCommandSenderOnMessageSync and MessageSyncEvent.toCommandSender
2022-08-03 11:27:39 +08:00
cssxsh
c38740ce2f
在 Image 序列化时支持全部属性 ( #2036 )
...
* fix: Image Serializer Delegate
* use: api dump
* add: test Image serialization
* fix: type (SerialName) and deserialize
* fix: native test
2022-07-22 03:05:08 +08:00
Him188
e5cad1d0ba
Rewrite MessageSerializers for new project structure ( #2159 )
2022-07-20 15:09:09 +08:00
Him188
fd67ba9204
Configure shadow relocation and add checks for multiplatform publishing
2022-07-20 00:30:16 +08:00
AdoptOSS
7325c1f7e2
native: 优化 build script 及 actions,修复 ECDH 相关资源释放问题 ( #2110 )
...
* build: fix build on Windows
* test: fix ContentEqualsTest on native
* build: allow disabling targets with property
* fix: free ECDH-related resources properly on native
avoid memory leaking (usually on *nix) or crash (usually on Windows)
Signed-off-by: AdoptOSS <adoptoss@outlook.com>
* build(workflow): remove invalid options
* fix(styling): `mirai.target` property
* build(workflow): try to limit memory usage during mirai-console:tools:gradle-plugin:integTest
* enhance(test): use buildList
* build(workflow): retry
Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-07-20 00:30:16 +08:00
Him188
21c4a5ba04
Use kotlinx-coroutines-test
2022-07-20 00:30:16 +08:00
Him188
cca40b8aa3
Add dummy jvmBase target for IDE
2022-07-20 00:30:16 +08:00
Him188
7dbb1a5ad7
Add RunConfigurations
2022-07-20 00:30:16 +08:00
Him188
4230a6e84c
Remove MiraiLogger.subLogger in mirai-core-api to overcome declaration clash on native
2022-07-20 00:30:16 +08:00
Him188
fe0a4de368
Produce shared libraries and static libraries
2022-07-20 00:30:16 +08:00
Him188
4c6b879873
Upgrade to Ktor 2.0.2, use CIO engine for linux targets; Remove ktor-client-okhttp from mirai-core-api jvmBaseMain
...
Use Input.readAllText instead of Input.readText, because readText only reads one buffer.
#2084
2022-07-20 00:30:16 +08:00
Him188
d27228c8c8
Rewrite MessageSerializers, register serializers in each MessageProtocol, implement for native targets
2022-07-20 00:30:16 +08:00
Him188
13dadd5a95
Implement mirai-core for native
2022-07-20 00:30:16 +08:00
Him188
732e61e37d
Ensure for all MessageChain subclasses, equals
, hashCode
give consistent results.
2022-07-20 00:30:16 +08:00
Him188
7088835402
HMPP
2022-07-20 00:30:16 +08:00
Him188
ff2a8acb0c
Implement multiplatform modules
2022-07-20 00:30:16 +08:00
Him188
ce87400998
Use ktor-io to replace kotlinx-io
2022-07-20 00:30:16 +08:00
Him188
0571be1a55
Commonize projects: mirai-core series, and mirai-console-compiler-annotations
2022-07-20 00:30:16 +08:00
Him188
d96641dedb
Configure HMPP project structure
2022-07-20 00:30:16 +08:00
Him188
a4e7fda416
Raise deprecation level for 2.12
2022-06-14 11:19:44 +01:00
Him188
1a2241b8b2
Add Java-friendly EventChannel.exceptionHandler API, close #1953
2022-06-08 21:42:20 +01:00
Him188
bcaf9b5060
Fix warningSince for deprecation of GroupEntranceAnnouncementChangeEvent
2022-06-08 21:40:42 +01:00
Him188
67984bfbad
Deprecate GroupEntranceAnnouncementChangeEvent, as per #1873
2022-06-08 21:31:50 +01:00
Him188
38465972ba
Add more details in QuoteReply.toString
2022-05-25 22:39:53 +01:00
Him188
c75d1f7074
Add MessageSource.isOriginalMessageInitialized
2022-05-25 22:39:53 +01:00
Him188
7687749030
Add more details in MessageSource.toString
2022-05-25 22:39:53 +01:00
Him188
3e38f359ba
Add ForwardMessage.BuilderNode.toString
2022-05-25 22:39:53 +01:00
Him188
3b7eb40529
Add implementation notes for MessageSource.originalMessage
2022-05-25 22:39:53 +01:00
Him188
54b3bf405f
Add notes for Dice.name
2022-05-25 22:39:53 +01:00
Him188
08d1fc1f38
Add more MessageProtocolTest
2022-05-25 22:39:53 +01:00
Him188
a8c231485c
SilentLogger: return false for all isEnabled checks
2022-05-25 22:39:53 +01:00
Him188
0bb86a3b11
Rearrange functions in MessageVisitor to correspond their hierarchy
2022-05-25 22:39:53 +01:00
Him188
0cef98dec0
Fix OfflineAudioFactory configuration
2022-05-25 22:39:53 +01:00
Him188
d6a56f1052
Remove generic type on MessageVisitorUnit
2022-05-25 22:39:53 +01:00
Him188
287769799a
Enable kotlin-dynamic-delegation in mirai-core and mirai-core-api
2022-05-25 22:39:53 +01:00
Him188
0c708c8197
Redesign MessageChain hierarchy: Add LinearMessageChainImpl and CombinedMessage
2022-05-25 22:39:53 +01:00
Him188
b40b681f81
Deprecate EmptyMessageChain
in favor of emptyMessageChain()
2022-05-25 22:39:53 +01:00
Him188
3955546868
Add MessageVisitor
, MessageVisitorEx
, Message.accept
and Message.acceptChildren
as internal API
2022-05-25 22:39:53 +01:00
cssxsh
a1a517c03f
fix: FileMessage.Delegate SerialName ( #2041 )
2022-05-18 09:07:31 +01:00
Him188
d8ceb7ae5b
Fix @since
2022-05-16 19:14:14 +01:00
Him188
4495e36e7c
Fix event broadcast directly without checks. Add notes for broadcasting an event.
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
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
cssxsh
c6b47a3231
Fix MarketFace contentToString, return '[商城表情]' if original name is empty ( #2030 )
2022-05-14 11:14:36 +01:00
Karlatemp
cb3bba986c
Fix IMirai
initialize; Fix #1861 ; Fix some error caused by d757764308
2022-05-06 17:47:22 +08:00
Him188
4fa853065c
Add BotConfiguration.disableAccountSecretes
2022-05-02 14:01:53 +01:00
Him188
54eb4387e4
Make log4j.Logger.asMiraiLogger
and useLog4j2
stable
2022-05-02 11:13:55 +01:00