Commit Graph

5575 Commits

Author SHA1 Message Date
sandtechnology
95a36443fe Fix #1192 again, taken suggestion from @AdoptOSS and @takayama-lily 2021-07-12 02:46:40 +08:00
sandtechnology
69a48987e7 Revert "Fix #1192, request admin when loading groups (#1257)"
This reverts commit ad7f95d0
2021-07-12 02:46:40 +08:00
sandtechnology
b2d6e7423a
Fix #1405, before it is a compiler undefined behavior (#1408) 2021-07-11 10:07:41 +08:00
Karlatemp
2c3f686315
Update issue template of bug report 2021-07-07 23:03:18 +08:00
Him188
dd606c3022 Improve performance of hexToBytes and simplify similar extensions 2021-07-07 15:00:28 +08:00
Him188
eaa8f20208 Mark UserProfile with NotStableForInheritance 2021-07-07 13:47:45 +08:00
Him188
e389594c47 Update docs on MemberPermission 2021-07-07 13:47:28 +08:00
Him188
8ede2cc78f Release version 2.7-M2 2021-07-06 21:50:13 +08:00
Him188
47cf27f4d8 apiDump 2021-07-06 20:20:04 +08:00
Him188
a0baa65193 Announcement API: Refine naming of properties:
- pinned -> isPinned
- popup -> showPopup
- needConfirm -> requireConfirmation

- readMemberNumber -> confirmedMembersCount
- publishTime -> publicationTime
- isAllRead -> allConfirmed
2021-07-06 19:45:51 +08:00
Him188
881f713be2 Update docs of announcement 2021-07-06 19:12:45 +08:00
Him188
9d9b9ce7e2 Change AnnouncementImage's width and height to Int 2021-07-06 19:12:45 +08:00
Him188
51d354c5e9 Improve Announcement logging 2021-07-06 19:12:45 +08:00
Him188
6145b3ef47 Remove inline to make compiler happy :) 2021-07-06 19:12:45 +08:00
Him188
c588b5ce76 Add permission requirement to docs on
some Announcement API
2021-07-06 19:12:45 +08:00
Him188
d08c6b81a8 Add simplified one-line API for publishing a single announcement 2021-07-06 19:12:45 +08:00
Him188
b98fcdd2e5 Add default argument to OfflineAnnouncement 2021-07-06 19:12:45 +08:00
Him188
f7e2391d96 Add contracts for eligible Announcement API 2021-07-06 19:12:45 +08:00
Him188
9a270dbba7 apiDump 2021-07-06 19:12:45 +08:00
Him188
d10cd270e8 Make AnnouncementParameters better for Java 2021-07-06 19:12:45 +08:00
Him188
5c89645056 Add a stable factory-method for AnnouncementImage 2021-07-06 19:12:45 +08:00
Him188
b239c57679 Re-order parameters of AnnouncementImage 2021-07-06 19:12:45 +08:00
Him188
858766d6b5 Make OfflineAnnouncement.create synthetic 2021-07-06 19:12:45 +08:00
Him188
1abc65fb16 Update docs for Announcement API 2021-07-06 19:12:45 +08:00
Him188
47192f3ee3 Make Announcements.asStream not suspend 2021-07-06 19:12:45 +08:00
Him188
9f1343c02e Generate equals, hashCode and toString for AnnouncementParameters abd AnnouncementImage 2021-07-06 19:12:45 +08:00
Him188
cf7b2a14a1 Catch exceptions when fetching group announcements and log with logger 2021-07-06 19:12:45 +08:00
Him188
d2e35772d0 Add constructor-like functions for Kotlin users 2021-07-06 19:12:45 +08:00
Him188
1abfcf4317 Add OfflineAnnouncement.serializer 2021-07-06 19:12:45 +08:00
Him188
b319e2bc5c Remove parameter title of Announcement 2021-07-06 19:12:45 +08:00
Him188
4a2b510a70 Remove announcements' low-level API and bundle them into AnnouncementProtocol, improve code style and maintainability 2021-07-06 19:12:45 +08:00
Him188
251bf3d9df Add JsonStruct to simplify deserialization 2021-07-06 19:12:45 +08:00
Him188
f0dc3cdf7e Add CheckableResult to standardize checks for deserialized responses 2021-07-06 19:12:45 +08:00
Him188
f5ce64ba4f Redesign Announcement API
Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-07-06 19:12:45 +08:00
Him188
194d34d309 Remove meaningless @LazyProperty 2021-07-06 19:12:10 +08:00
Him188
d6c4b5456f Remove inappropriate weak references 2021-07-06 19:12:10 +08:00
Him188
be3c873f4f
Face.toString: use contentToString() for better readability (#1382) 2021-07-06 16:07:41 +08:00
忘忧北萱草
2f010b749b
Add third-party Python SDK YiriMirai (#1387) 2021-07-06 16:07:24 +08:00
CHUANWISE
200e4af8f1
修改了一些文档中的错误 (#1393) 2021-07-06 16:05:06 +08:00
Karlatemp
a4f0bbfe80
Fix document of RandomAccessFile.toExternalResource() 2021-07-05 18:16:53 +08:00
Him188
69f2d24c22 Fix build 2021-07-05 18:02:01 +08:00
Him188
c4fd79ef22 Fix doc on ExternalResource 2021-07-05 18:00:57 +08:00
Him188
ddcac473dd Improve logging on updating account secrets 2021-07-05 17:50:38 +08:00
Him188
8fdce4dc98 Update docs on ExternalResource for auto release, and categorise declarations 2021-07-05 17:20:57 +08:00
Him188
abc2bfcb3e
Add @NotStableForInheritance and apply it to suitable classes (#1385)
* Add `@NotStableForInheritance` and apply it to suitable classes

* apiDump

* Fix import

* fix
2021-07-05 12:50:00 +08:00
Him188
7722a5a0b0 Move KSerializer.map to mirai-core-utils 2021-07-04 17:56:23 +08:00
Karlatemp
4c810ee3ee
ExternalResourceLeakObserver (#1383)
* ExternalResourceLeakObserver

* Avoid exceptions of user-defined run-when-close actions

* Fix build

* Release references

* Move `ExternalResourceLeakObserver` to mirai-core-api

* Make internal

* Make `close()` thread-safely

* typo

* Don't track `ExternalResource` creation stack by default

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

Co-authored-by: Him188 <Him188@mamoe.net>
2021-07-03 22:05:12 +08:00
sandtechnology
b7869888f0
StatSvc.Register: Provide SSO Ip and correct logic (#1240)
* StatSvc.Register: Provide SSO Ip and correct logic

* Remove unnessacy launch

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

* Test for last polled ip

* Normal login test for last ip

* Fix test failed and remove debug code

* Fix unit test and build

* Optimize pollCurrent and pollAny method

* Use uOldSSOIp and uNewSSOIp only when protocol is PHONE

* Fix bug in toIpV4Long

* Fix new line in NettyBotNormalLoginTest.kt

* Using Inet4Address and toInt method for toIpV4Long

* Return Unsigned Long for toIpV4Long

* Remove unnessacy synchronized annotation

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

* Using createAddress method instead of address

* Moving lastDisconnectedIp and lastConnectedIp to Server
List

* Fix build

* Fix build and remove empty line

* Keeping naming consistent

* Use bot.components instead of overrideComponents

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

* Revert overrideComponents changes and add comment for overrideComponents

Co-authored-by: Him188 <Him188@mamoe.net>
2021-07-03 22:04:49 +08:00
Him188
2713127466 Fix reconnection on Heartbeat timeout: add PacketTimeoutException 2021-07-03 21:57:12 +08:00
Him188
59e60d42ce Update to kotlinx-serialization 1.2.1 and yamlkt 0.10.0 2021-07-02 22:39:56 +08:00