Commit Graph

5821 Commits

Author SHA1 Message Date
Him188
92ab2bf50b Add @since to Image.width etc 2021-11-10 22:49:42 +00:00
Karlatemp
31399efe40
AbstractExternalResource (#1637)
* AbstractExternalResource

* typo

* make `ResourceCleanCallback` `fun interface`

* custom display name

* update logic

* Update docs

* Update ExternalResource.kt
2021-11-10 14:39:32 +00:00
Eritque arcus
12e3c4fa90
check permission before recall (#1662)
* recall check(owner sender)

* recall check

* test

* fix permission check and test

* update test

* add one more test
2021-11-10 14:39:18 +00:00
sandtechnology
57a20ea08c
Handle service unavailable case when sending message, thanks to EDG (#1659)
* Handle server busy case in sending message, thanks to EDG

* Rename to ServiceUnavailable and throw ServiceUnavailableException

* Rename to ServiceUnavailable

* Remove ServiceUnavailableException, replace with IllegalStateException
2021-11-09 22:54:19 +00:00
Him188
ef2d22c956 Ensure thread safe 2021-11-09 22:53:57 +00:00
Him188
4a488f3416 Add utils threadLocal 2021-11-09 22:53:57 +00:00
Him188
7da6a50284 Use system-default locale for logging 2021-11-09 22:53:57 +00:00
Him188
6b85dd536b Update console ref 2021-11-09 22:47:24 +00:00
Him188
8d641c1d4c Update Bots.md: add ref to DebuggingNetwork.md, fix #1504 2021-11-09 22:29:01 +00:00
Him188
b0c4821a20 Set version on main branch to 2.9.0-M1 2021-11-09 22:12:11 +00:00
Him188
cb4fb495a3 Rename ByteArray.encodeToString to .decodeToString 2021-11-09 22:12:11 +00:00
Karlatemp
e1ca6dd6c9
Avoid user injection 2021-11-09 18:20:56 +08:00
Karlatemp
fa364b4b45
Reject sending FileMessage (#1657)
* Reject sending `FileMessage`

* Update docs

* Update mirai-core-api/src/commonMain/kotlin/contact/file/AbsoluteFile.kt

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

Co-authored-by: Him188 <Him188@mamoe.net>
2021-11-07 10:55:02 +00:00
Karlatemp
76d23c5b0c
NetReplayHelper 2021-11-07 12:33:02 +08:00
Karlatemp
0403de2b39
Improve error message of downloadLongMessage&ForwardMessage 2021-11-06 23:24:09 +08:00
Karlatemp
69931538f5
Fix QuoteReply without msgHead, fix #1641 2021-11-06 23:20:48 +08:00
Karlatemp
c56708ca7f
Fix environment check 2021-11-06 23:11:26 +08:00
Him188
99f461ae00 Update docs for AudioSupported.uploadAudio: add ref to mirai-silk-converter 2021-11-06 15:00:51 +00:00
Him188
a9037298c1 Update console ref 2021-11-06 14:45:06 +00:00
Him188
e3dcaf6654 Remove use of deprecated MiraiLogger.TopLevel 2021-11-06 14:44:58 +00:00
Him188
bb9c9d7aa4 Remove use of deprecated RemoteFile 2021-11-06 14:36:35 +00:00
Karlatemp
8870558d4c
Fix message logging 2021-11-06 19:15:30 +08:00
Him188
3644ff0035
Use Audio than Voice 2021-11-06 10:28:46 +00:00
Him188
5c019607b6
Update README.md 2021-11-06 10:22:03 +00:00
RF-Tar-Railt
41e1c1970f Add SDK Cesloi 2021-11-05 12:19:07 +00:00
Karlatemp
9b47b2877c
Try fix publishing
[no ci]
2021-11-02 23:10:32 +08:00
Him188
32f2f705a5 Set version on main branch to 2.8.0 2021-10-30 22:56:12 +01:00
Him188
b02dc431db Update console ref 2021-10-30 22:49:19 +01:00
Him188
919498c215 Set version to 2.8.0-RC 2021-10-30 22:48:37 +01:00
Albert
3f51867f52
删除多余登录服务器 (#1634) 2021-10-30 16:06:16 +01:00
Him188
9e151e7026
Redesign group files (#1589)
* Prototype new `RemoteFiles` design

* add `@JavaFriendlyAPI`

* remove `quietly`

* move `moveTo` to `AbsoluteFile`

* Add java friendly apis

* Remove `condoneMissing`

* Change `renameTo`

* Extract interface declarations

* update docs

* Add `AbsoluteFileFolder.exists`

* Add common ProgressionCallback

* Implement `RemoteFiles` and relevant `Absolute*`

* Implement `refresh` and `refreshed`

* Update docs

* Forbid blank paths

* Update docs

* Deprecate `RemoteFile` and implement `FileMessage.toAbsoluteFile`

* Change corresponding properties on operations

* Deprecate more old declarations

* Update docs

* Add check for permission

* Allow relative paths and fix upload

* fix absolutePath

* doc update

* api dump

* `Result<R>.onSuccessCatching`

* return null when file not exists

* Fix file uploading

* Fix folder.absolutePath

* add `resolveFileById`

* Implement toString

* Add `nameWithoutExtension` and `extension`

* Add `deep` to resolveFileById

* Implement permission check

* Remove notes

* Fix `resolveFileById`

* Fix `extension`

* add docs

* Improve docs

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-10-30 16:05:57 +01:00
Him188
767475f9ab Deprecate IMirai.calculateGroupUinByGroupCode, and migrate usages to getUin. Close #1479 2021-10-30 13:44:49 +01:00
Albert
790f37ce05
修复群联系人保存 (#1633) 2021-10-30 13:38:35 +01:00
Karlatemp
217907c58a
Support sending MusicShare to friends. (#1615)
* Support sending `MusicShare` to friends.

- Also fix a potential data out-of-bounds issues

* `TypeSafeMap.get` with default values

* Fix tests
2021-10-28 13:44:18 +01:00
Karlatemp
e61fbbcc70
Fix getRawGroupHonorListData, getRawGroupActiveData (#1616) 2021-10-28 13:44:00 +01:00
Karlatemp
527fe08446
Redesign MessageChain.cleanupRubbishMessageElements() (#1607)
* Redesign `MessageChain.cleanupRubbishMessageElements()`

* Fix logic

* `CleanupRubbishMessageElementsTest`

* Fix testing unit

* more testing
2021-10-28 13:43:41 +01:00
sandtechnology
3d502a496e
Handle other cases in jpeg header (#1611)
* Handle other cases in jpeg header

Co-authored-by: sandtechnology <a1294790523@hotmail.com>

* Add unit tests

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-10-28 13:43:31 +01:00
Karlatemp
d0171878ff
Fix GroupAllowConfessTalkEvent; fix #1622 2021-10-26 22:53:51 +08:00
Karlatemp
ffbe50c1fb
Update UserManual.md
[no ci]
2021-10-20 23:22:46 +08:00
Karlatemp
ad1d75687a
Update .gitattributes
[no ci]
2021-10-17 18:14:32 +08:00
Karlatemp
938e7eae57
Fix ImageDecoder of JPEG format; fix #1610 2021-10-17 17:11:34 +08:00
BlueGlassBlock
ee78b5dbe5
Renamed GraiaProject/Argon to GraiaProject/Ariadne (#1609)
[no ci]
2021-10-17 10:52:43 +08:00
BlueGlassBlock
a988ab8611
add third-party SDK GraiaProject/Argon (#1606) 2021-10-16 14:06:32 +01:00
Karlatemp
ace32caa28
Fix cross images downloading url; fix #1600 2021-10-16 16:54:15 +08:00
Karlatemp
07d5a6ca7d
Chain calling of ExternalResource.toExternalResource(); fix #1588 2021-10-09 21:49:49 +08:00
Karlatemp
b31f7b1ba7
AudioToSilkService (#1591)
* AudioToSilkService

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

Co-authored-by: Eritque arcus <1930893235@qq.com>

* `@since`; `@Experimental`

Co-authored-by: Eritque arcus <1930893235@qq.com>
2021-10-09 09:21:58 +01:00
AdoptOSS
8bd3d94537
Introduce mirai-bom for dependency management (#1417)
* Introduce `mirai-bom` for dependency management

* Update docs on `mirai-bom`

* Remove unnecessary `mirai-bom:publish` in workflow

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2021-10-09 09:18:58 +01:00
Karlatemp
b027c6c7b7
Allow load settings from file 2021-10-07 12:04:43 +08:00
Karlatemp
0b2a759028
Image.isEmoji() (#1596)
- Also remove image regex inlining
2021-10-05 22:01:14 +08:00
Eritque arcus
96c54220e3
misspelling (#1594)
[skip ci]
2021-10-03 19:33:43 +08:00