From a9567886b45bc38392851ec9291b865e79508fbb Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:54:27 +0800 Subject: [PATCH 01/18] https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3 --- CHANGELOG.md | 4 ++++ android/build.gradle | 2 +- ios/flutter_openim_sdk.podspec | 2 +- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0475cb..2d7ea1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3+3 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3) + ## 3.8.2 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.2) diff --git a/android/build.gradle b/android/build.gradle index 944b98b..7ca92d8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -50,5 +50,5 @@ android { } dependencies { - implementation 'io.openim:core-sdk:3.8.3-patch2@aar' + implementation 'io.openim:core-sdk:3.8.3-patch3@aar' } \ No newline at end of file diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index 81d68a3..8d06b73 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,7 +17,7 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.8.3+2' + s.dependency 'OpenIMSDKCore','3.8.3+3' s.static_framework = true s.library = 'resolv' diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 6bb69d8..302fcc6 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+2'; + static const version = '3.8.3+3'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 651869d..83ff101 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+2 +version: 3.8.3+3 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From c2bf30e268ba039605e9a4e8a1d9abd5c9154892 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:48:22 +0800 Subject: [PATCH 02/18] fix: The uninitSDK function removes the Future. (#204) --- lib/src/manager/im_manager.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/manager/im_manager.dart b/lib/src/manager/im_manager.dart index 322f6a4..b568b40 100644 --- a/lib/src/manager/im_manager.dart +++ b/lib/src/manager/im_manager.dart @@ -57,7 +57,7 @@ class IMManager { case 'onUserTokenExpired': _connectListener.userTokenExpired(); break; - case 'onUserTokenInvalid': + case 'onUserTokenInvalid': _connectListener.userTokenInvalid(); break; } @@ -412,8 +412,8 @@ class IMManager { } /// Deinitialize the SDK - Future unInitSDK() { - return _channel.invokeMethod('unInitSDK', _buildParam({})); + void unInitSDK() { + _channel.invokeMethod('unInitSDK', _buildParam({})); } /// Login From ab67f7fa10b5e275a181da2ba27d7cfa59e17b73 Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:35:25 +0800 Subject: [PATCH 03/18] Update LICENSE --- LICENSE | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 197 insertions(+), 17 deletions(-) diff --git a/LICENSE b/LICENSE index 5c1804f..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2018 OpenIM Corporation + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 1. Definitions. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 8beb75eb754854d9a374f2c44099c8a8fd65ae38 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:16:00 +0800 Subject: [PATCH 04/18] fix: InvitedJoinGroupNotification --- lib/src/models/notification_info.dart | 283 ++++++++++++-------------- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 130 insertions(+), 157 deletions(-) diff --git a/lib/src/models/notification_info.dart b/lib/src/models/notification_info.dart index 085d5d8..b62c157 100644 --- a/lib/src/models/notification_info.dart +++ b/lib/src/models/notification_info.dart @@ -1,6 +1,6 @@ import '../../flutter_openim_sdk.dart'; -/// OA notification +/// OA Notification class OANotification { /// Title String? notificationName; @@ -58,57 +58,50 @@ class OANotification { text = json['text']; externalUrl = json['externalUrl']; mixType = json['mixType']; - pictureElem = json['pictureElem'] != null - ? PictureElem.fromJson(json['pictureElem']) - : null; - soundElem = json['soundElem'] != null - ? SoundElem.fromJson(json['soundElem']) - : null; - videoElem = json['videoElem'] != null - ? VideoElem.fromJson(json['videoElem']) - : null; - fileElem = - json['fileElem'] != null ? FileElem.fromJson(json['fileElem']) : null; + pictureElem = json['pictureElem'] != null ? PictureElem.fromJson(json['pictureElem']) : null; + soundElem = json['soundElem'] != null ? SoundElem.fromJson(json['soundElem']) : null; + videoElem = json['videoElem'] != null ? VideoElem.fromJson(json['videoElem']) : null; + fileElem = json['fileElem'] != null ? FileElem.fromJson(json['fileElem']) : null; ex = json['ex']; } Map toJson() { final data = Map(); - data['notificationName'] = this.notificationName; - data['notificationFaceURL'] = this.notificationFaceURL; - data['notificationType'] = this.notificationType; - data['text'] = this.text; - data['externalUrl'] = this.externalUrl; - data['mixType'] = this.mixType; - if (this.pictureElem != null) { - data['pictureElem'] = this.pictureElem!.toJson(); + data['notificationName'] = notificationName; + data['notificationFaceURL'] = notificationFaceURL; + data['notificationType'] = notificationType; + data['text'] = text; + data['externalUrl'] = externalUrl; + data['mixType'] = mixType; + if (pictureElem != null) { + data['pictureElem'] = pictureElem!.toJson(); } - if (this.soundElem != null) { - data['soundElem'] = this.soundElem!.toJson(); + if (soundElem != null) { + data['soundElem'] = soundElem!.toJson(); } - if (this.videoElem != null) { - data['videoElem'] = this.videoElem!.toJson(); + if (videoElem != null) { + data['videoElem'] = videoElem!.toJson(); } - if (this.fileElem != null) { - data['fileElem'] = this.fileElem!.toJson(); + if (fileElem != null) { + data['fileElem'] = fileElem!.toJson(); } - data['ex'] = this.ex; + data['ex'] = ex; return data; } } -/// 群事件通知 +/// Group Event Notification class GroupNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 当前事件操作者信息 + /// Current event operator information GroupMembersInfo? opUser; - /// 群拥有者信息 + /// Group owner information GroupMembersInfo? groupOwnerUser; - /// 产生影响的群成员列表 + /// List of affected group members List? memberList; GroupNotification({ @@ -120,12 +113,8 @@ class GroupNotification { GroupNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; - groupOwnerUser = json['groupOwnerUser'] != null - ? GroupMembersInfo.fromJson(json['groupOwnerUser']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; + groupOwnerUser = json['groupOwnerUser'] != null ? GroupMembersInfo.fromJson(json['groupOwnerUser']) : null; if (json['memberList'] != null) { memberList = []; json['memberList'].forEach((v) { @@ -136,40 +125,42 @@ class GroupNotification { Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.groupOwnerUser != null) { - data['groupOwnerUser'] = this.groupOwnerUser!.toJson(); + if (groupOwnerUser != null) { + data['groupOwnerUser'] = groupOwnerUser!.toJson(); } - if (this.memberList != null) { - data['memberList'] = this.memberList!.map((v) => v.toJson()).toList(); + if (memberList != null) { + data['memberList'] = memberList!.map((v) => v.toJson()).toList(); } return data; } } -/// 用户被邀请进群通知 +/// User Invited to Join Group Notification class InvitedJoinGroupNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 操作者信息 + /// Operator information GroupMembersInfo? opUser; - /// 被邀请进群的成员信息 + /// Inviter information + GroupMembersInfo? inviterUser; + + /// List of members invited to join the group List? invitedUserList; InvitedJoinGroupNotification({this.group, this.opUser, this.invitedUserList}); InvitedJoinGroupNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; + inviterUser = json['inviterUser'] != null ? GroupMembersInfo.fromJson(json['inviterUser']) : null; if (json['invitedUserList'] != null) { invitedUserList = []; json['invitedUserList'].forEach((v) { @@ -179,40 +170,39 @@ class InvitedJoinGroupNotification { } Map toJson() { - final Map data = new Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + final Map data = {}; + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.invitedUserList != null) { - data['invitedUserList'] = - this.invitedUserList!.map((v) => v.toJson()).toList(); + if (inviterUser != null) { + data['inviterUser'] = inviterUser!.toJson(); + } + if (invitedUserList != null) { + data['invitedUserList'] = invitedUserList!.map((v) => v.toJson()).toList(); } return data; } } -/// 组踢出成员通知 +/// Group Member Kicked Notification class KickedGroupMemeberNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 操作者信息 + /// Operator information GroupMembersInfo? opUser; - /// 被踢出群的成员信息列表 + /// List of members kicked from the group List? kickedUserList; - KickedGroupMemeberNotification( - {this.group, this.opUser, this.kickedUserList}); + KickedGroupMemeberNotification({this.group, this.opUser, this.kickedUserList}); KickedGroupMemeberNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; if (json['kickedUserList'] != null) { kickedUserList = []; json['kickedUserList'].forEach((v) { @@ -223,87 +213,82 @@ class KickedGroupMemeberNotification { Map toJson() { final Map data = new Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.kickedUserList != null) { - data['kickedUserList'] = - this.kickedUserList!.map((v) => v.toJson()).toList(); + if (kickedUserList != null) { + data['kickedUserList'] = kickedUserList!.map((v) => v.toJson()).toList(); } return data; } } -/// 退出群通知 +/// Quit Group Notification class QuitGroupNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 退群的成员信息 + /// Information of the member who quit the group GroupMembersInfo? quitUser; QuitGroupNotification({this.group, this.quitUser}); QuitGroupNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - quitUser = json['quitUser'] != null - ? GroupMembersInfo.fromJson(json['quitUser']) - : null; + quitUser = json['quitUser'] != null ? GroupMembersInfo.fromJson(json['quitUser']) : null; } Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.quitUser != null) { - data['quitUser'] = this.quitUser!.toJson(); + if (quitUser != null) { + data['quitUser'] = quitUser!.toJson(); } return data; } } -/// 进群通知 +/// Enter Group Notification class EnterGroupNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 进入群的成员信息 + /// Information of the member who entered the group GroupMembersInfo? entrantUser; EnterGroupNotification({this.group, this.entrantUser}); EnterGroupNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - entrantUser = json['entrantUser'] != null - ? GroupMembersInfo.fromJson(json['entrantUser']) - : null; + entrantUser = json['entrantUser'] != null ? GroupMembersInfo.fromJson(json['entrantUser']) : null; } Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.entrantUser != null) { - data['quitUser'] = this.entrantUser!.toJson(); + if (entrantUser != null) { + data['entrantUser'] = entrantUser!.toJson(); } return data; } } -/// 群权转让通知 +/// Group Rights Transfer Notification class GroupRightsTransferNoticication { - /// 群信息 + /// Group information GroupInfo? group; - /// 操作者信息 + /// Operator information GroupMembersInfo? opUser; - /// 群新的拥有者信息 + /// New group owner information GroupMembersInfo? newGroupOwner; GroupRightsTransferNoticication({ @@ -314,41 +299,37 @@ class GroupRightsTransferNoticication { GroupRightsTransferNoticication.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; - newGroupOwner = json['newGroupOwner'] != null - ? GroupMembersInfo.fromJson(json['newGroupOwner']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; + newGroupOwner = json['newGroupOwner'] != null ? GroupMembersInfo.fromJson(json['newGroupOwner']) : null; } Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.newGroupOwner != null) { - data['newGroupOwner'] = this.newGroupOwner!.toJson(); + if (newGroupOwner != null) { + data['newGroupOwner'] = newGroupOwner!.toJson(); } return data; } } -/// 禁言成员通知 +/// Mute Member Notification class MuteMemberNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 操作者信息 + /// Operator information GroupMembersInfo? opUser; - /// 被禁言的成员信息 + /// Muted member information GroupMembersInfo? mutedUser; - /// 禁言时间s + /// Mute duration in seconds int? mutedSeconds; MuteMemberNotification({ @@ -360,40 +341,36 @@ class MuteMemberNotification { MuteMemberNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; - mutedUser = json['mutedUser'] != null - ? GroupMembersInfo.fromJson(json['mutedUser']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; + mutedUser = json['mutedUser'] != null ? GroupMembersInfo.fromJson(json['mutedUser']) : null; mutedSeconds = json['mutedSeconds']; } Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.mutedUser != null) { - data['mutedUser'] = this.mutedUser!.toJson(); + if (mutedUser != null) { + data['mutedUser'] = mutedUser!.toJson(); } - data['mutedSeconds'] = this.mutedSeconds; + data['mutedSeconds'] = mutedSeconds; return data; } } -/// 阅后即焚通知 +/// Burn After Reading Notification class BurnAfterReadingNotification { - /// 接收者 + /// Receiver String? recvID; - /// 发送者 + /// Sender String? sendID; - /// 是否开启 + /// Whether enabled bool? isPrivate; BurnAfterReadingNotification({this.recvID, this.sendID, this.isPrivate}); @@ -406,22 +383,22 @@ class BurnAfterReadingNotification { Map toJson() { final data = Map(); - data['recvID'] = this.recvID; - data['sendID'] = this.sendID; - data['isPrivate'] = this.isPrivate; + data['recvID'] = recvID; + data['sendID'] = sendID; + data['isPrivate'] = isPrivate; return data; } } -/// 群成员信息发送变化通知 +/// Group Member Information Changed Notification class GroupMemberInfoChangedNotification { - /// 群信息 + /// Group information GroupInfo? group; - /// 操作者信息 + /// Operator information GroupMembersInfo? opUser; - /// 资料发生改变的成员 + /// Member with changed information GroupMembersInfo? changedUser; GroupMemberInfoChangedNotification({ @@ -432,25 +409,21 @@ class GroupMemberInfoChangedNotification { GroupMemberInfoChangedNotification.fromJson(Map json) { group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null; - opUser = json['opUser'] != null - ? GroupMembersInfo.fromJson(json['opUser']) - : null; - changedUser = json['changedUser'] != null - ? GroupMembersInfo.fromJson(json['changedUser']) - : null; + opUser = json['opUser'] != null ? GroupMembersInfo.fromJson(json['opUser']) : null; + changedUser = json['changedUser'] != null ? GroupMembersInfo.fromJson(json['changedUser']) : null; } Map toJson() { final data = Map(); - if (this.group != null) { - data['group'] = this.group!.toJson(); + if (group != null) { + data['group'] = group!.toJson(); } - if (this.opUser != null) { - data['opUser'] = this.opUser!.toJson(); + if (opUser != null) { + data['opUser'] = opUser!.toJson(); } - if (this.changedUser != null) { - data['changedUser'] = this.changedUser!.toJson(); + if (changedUser != null) { + data['changedUser'] = changedUser!.toJson(); } return data; } -} +} \ No newline at end of file diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 302fcc6..974636a 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+3'; + static const version = '3.8.3-patch3+1'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 83ff101..ffadbb6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+3 +version: 3.8.3-patch3+1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 5c13d83cc121afde351bec8216f950eaaf801149 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:40:59 +0800 Subject: [PATCH 05/18] version. --- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 974636a..6082bd6 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3-patch3+1'; + static const version = '3.8.3-hotfix.3+1'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index ffadbb6..43a84eb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3-patch3+1 +version: 3.8.3-hotfix.3+1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 622576295e4e8a3a1f624e1a321111b95221b32f Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:47:01 +0800 Subject: [PATCH 06/18] hotfix version. --- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 6082bd6..41e8ce1 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3-hotfix.3+1'; + static const version = '3.8.3+hotfix.3+1'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 43a84eb..fe8ddd8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3-hotfix.3+1 +version: 3.8.3+hotfix.3+1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 1ca0ee7aaf98be2dfd7a26972c958a5a64621070 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:50:10 +0800 Subject: [PATCH 07/18] hotfix version. --- example/pubspec.lock | 2 +- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 56cbd94..897e12c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "3.8.3+2" + version: "3.8.3+hotfix.3" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 41e8ce1..11032f6 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.3+1'; + static const version = '3.8.3+hotfix.3'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index fe8ddd8..5c798fc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.3+1 +version: 3.8.3+hotfix.3 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 375bd6fcdec86b8a5db0661842af19adf2e4ae2a Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:56:54 +0800 Subject: [PATCH 08/18] Update LICENSE --- LICENSE | 811 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 642 insertions(+), 169 deletions(-) diff --git a/LICENSE b/LICENSE index 261eeb9..f288702 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,674 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU General Public License is a free, copyleft license for +software and other kinds of works. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + The precise terms and conditions for copying, distribution and +modification follow. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + TERMS AND CONDITIONS - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + 0. Definitions. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "This License" refers to version 3 of the GNU General Public License. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + A "covered work" means either the unmodified Program or a work based +on the Program. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + 1. Source Code. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - END OF TERMS AND CONDITIONS + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - APPENDIX: How to apply the Apache License to your work. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - Copyright [yyyy] [name of copyright owner] + The Corresponding Source for a work in source code form is that +same work. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + 2. Basic Permissions. - http://www.apache.org/licenses/LICENSE-2.0 + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 5ee8870d96988e9cabcb07e7152718b816ee53ed Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Tue, 22 Apr 2025 19:17:28 +0800 Subject: [PATCH 09/18] Update LICENSE --- LICENSE | 143 ++++++++++++++++++++++++++------------------------------ 1 file changed, 65 insertions(+), 78 deletions(-) diff --git a/LICENSE b/LICENSE index f288702..0ad25db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see +For more information on this, and how to apply and follow the GNU AGPL, see . - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. From b46fb1a1d94bcf08f622b9ac311e5818895deb94 Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Wed, 23 Apr 2025 10:02:18 +0800 Subject: [PATCH 10/18] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c266652..b6582a5 100644 --- a/README.md +++ b/README.md @@ -155,4 +155,14 @@ Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/ma ## License :page_facing_up: -OpenIM is licensed under the Apache 2.0 license. See [LICENSE](https://github.com/openimsdk/open-im-server/tree/main/LICENSE) for the full license text. +This software is licensed under a dual-license model: + +- The GNU Affero General Public License (AGPL), Version 3 or later; **OR** +- Commercial license terms from OpenIMSDK. + +If you wish to use this software under commercial terms, please contact us at: contact@openim.io + +For more information, see: https://www.openim.io/en/licensing + + + From 4b4b580d71a852baa50c3e5bbd51502a200fb202 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:02:49 +0800 Subject: [PATCH 11/18] hotfix. --- lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 11032f6..e8fe9fe 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.3'; + static const version = '3.8.3+hotfix.3.1'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 5c798fc..0148832 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.3 +version: 3.8.3+hotfix.3.1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 7b65537e148a4010eba527511128ba234869a2cb Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 9 May 2025 16:06:46 +0800 Subject: [PATCH 12/18] fix: kick group members. --- lib/src/manager/im_group_manager.dart | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/src/manager/im_group_manager.dart b/lib/src/manager/im_group_manager.dart index 5cf15a3..15eee11 100644 --- a/lib/src/manager/im_group_manager.dart +++ b/lib/src/manager/im_group_manager.dart @@ -40,22 +40,20 @@ class GroupManager { /// [groupID] Group ID /// [userIDList] List of user IDs /// [reason] Reason for removal - Future> kickGroupMember({ + Future kickGroupMember({ required String groupID, required List userIDList, String? reason, String? operationID, }) => - _channel - .invokeMethod( - 'kickGroupMember', - _buildParam({ - 'groupID': groupID, - 'userIDList': userIDList, - 'reason': reason, - "operationID": Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupInviteResult.fromJson(map))); + _channel.invokeMethod( + 'kickGroupMember', + _buildParam({ + 'groupID': groupID, + 'userIDList': userIDList, + 'reason': reason, + "operationID": Utils.checkOperationID(operationID), + })); /// Query group member information /// [groupID] Group ID @@ -589,9 +587,7 @@ class GroupManager { param["ManagerName"] = "groupManager"; param = Utils.cleanMap(param); log('param: $param'); - + return param; } - - } From b96401de8a55e0de2d4d8072a73c0cd827e3adf4 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:10:48 +0800 Subject: [PATCH 13/18] feat: https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.7 --- CHANGELOG.md | 4 + android/build.gradle | 2 +- .../manager/FriendshipManager.java | 14 ++- .../manager/GroupManager.java | 13 ++- ios/Classes/Module/FriendshipManager.swift | 9 +- ios/Classes/Module/GroupManager.swift | 9 +- ios/flutter_openim_sdk.podspec | 2 +- lib/src/manager/im_conversation_manager.dart | 2 - lib/src/manager/im_friendship_manager.dart | 44 ++++++---- lib/src/manager/im_group_manager.dart | 48 ++++++---- lib/src/models/group_info.dart | 87 +++++++++++++++++++ lib/src/models/search_info.dart | 2 +- lib/src/models/user_info.dart | 75 ++++++++++++++++ lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 15 files changed, 269 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d7ea1e..6b7a8d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3+hotfix.7 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.7) + ## 3.8.3+3 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3) diff --git a/android/build.gradle b/android/build.gradle index 7ca92d8..e517fa6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -50,5 +50,5 @@ android { } dependencies { - implementation 'io.openim:core-sdk:3.8.3-patch3@aar' + implementation 'io.openim:core-sdk:3.8.3-patch7@aar' } \ No newline at end of file diff --git a/android/src/main/java/io/openim/flutter_openim_sdk/manager/FriendshipManager.java b/android/src/main/java/io/openim/flutter_openim_sdk/manager/FriendshipManager.java index d987f60..6efae10 100644 --- a/android/src/main/java/io/openim/flutter_openim_sdk/manager/FriendshipManager.java +++ b/android/src/main/java/io/openim/flutter_openim_sdk/manager/FriendshipManager.java @@ -35,14 +35,16 @@ public class FriendshipManager extends BaseManager { public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) { Open_im_sdk.getFriendApplicationListAsRecipient( new OnBaseListener(result, methodCall), - value(methodCall, "operationID") + value(methodCall, "operationID"), + jsonValue(methodCall, "req") ); } public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) { Open_im_sdk.getFriendApplicationListAsApplicant( new OnBaseListener(result, methodCall), - value(methodCall, "operationID") + value(methodCall, "operationID"), + jsonValue(methodCall, "req") ); } @@ -135,4 +137,12 @@ public class FriendshipManager extends BaseManager { jsonValue(methodCall, "req") ); } + + public void getFriendApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) { + Open_im_sdk.getFriendApplicationUnhandledCount( + new OnBaseListener(result, methodCall), + value(methodCall, "operationID"), + jsonValue(methodCall, "req") + ); + } } diff --git a/android/src/main/java/io/openim/flutter_openim_sdk/manager/GroupManager.java b/android/src/main/java/io/openim/flutter_openim_sdk/manager/GroupManager.java index a5a2667..528ee4b 100644 --- a/android/src/main/java/io/openim/flutter_openim_sdk/manager/GroupManager.java +++ b/android/src/main/java/io/openim/flutter_openim_sdk/manager/GroupManager.java @@ -126,14 +126,16 @@ public class GroupManager extends BaseManager { public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) { Open_im_sdk.getGroupApplicationListAsRecipient( new OnBaseListener(result, methodCall), - value(methodCall, "operationID") + value(methodCall, "operationID"), + jsonValue(methodCall, "req") ); } public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) { Open_im_sdk.getGroupApplicationListAsApplicant( new OnBaseListener(result, methodCall), - value(methodCall, "operationID") + value(methodCall, "operationID"), + jsonValue(methodCall, "req") ); } @@ -240,4 +242,11 @@ public class GroupManager extends BaseManager { jsonValue(methodCall, "userIDs") ); } + + public void getGroupApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) { + Open_im_sdk.getGroupApplicationUnhandledCount(new OnBaseListener(result, methodCall), + value(methodCall, "operationID"), + jsonValue(methodCall, "req") + ); + } } \ No newline at end of file diff --git a/ios/Classes/Module/FriendshipManager.swift b/ios/Classes/Module/FriendshipManager.swift index 06fd37b..df33753 100644 --- a/ios/Classes/Module/FriendshipManager.swift +++ b/ios/Classes/Module/FriendshipManager.swift @@ -21,6 +21,7 @@ public class FriendshipManager: BaseServiceManager { self["searchFriends"] = searchFriends self["setFriendListener"] = setFriendListener self["updateFriends"] = updateFriends + self["getFriendApplicationUnhandledCount"] = getFriendApplicationUnhandledCount } func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ @@ -48,11 +49,11 @@ public class FriendshipManager: BaseServiceManager { } func getFriendApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ - Open_im_sdkGetFriendApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"]) + Open_im_sdkGetFriendApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) } func getFriendApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ - Open_im_sdkGetFriendApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"]) + Open_im_sdkGetFriendApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) } func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ @@ -87,6 +88,10 @@ public class FriendshipManager: BaseServiceManager { func updateFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ Open_im_sdkUpdateFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) } + + func getFriendApplicationUnhandledCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ + Open_im_sdkGetFriendApplicationUnhandledCount(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) + } } public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol { diff --git a/ios/Classes/Module/GroupManager.swift b/ios/Classes/Module/GroupManager.swift index 62e2bd3..1e4db81 100644 --- a/ios/Classes/Module/GroupManager.swift +++ b/ios/Classes/Module/GroupManager.swift @@ -32,6 +32,7 @@ public class GroupManager: BaseServiceManager { self["setGroupListener"] = setGroupListener self["setGroupMemberInfo"] = setGroupMemberInfo self["transferGroupOwner"] = transferGroupOwner + self["getGroupApplicationUnhandledCount"] = getGroupApplicationUnhandledCount } func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { @@ -55,11 +56,11 @@ public class GroupManager: BaseServiceManager { } func getGroupApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { - Open_im_sdkGetGroupApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"]) + Open_im_sdkGetGroupApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) } func getGroupApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { - Open_im_sdkGetGroupApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"]) + Open_im_sdkGetGroupApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) } func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { @@ -147,6 +148,10 @@ public class GroupManager: BaseServiceManager { func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { Open_im_sdkTransferGroupOwner(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"]) } + + func getGroupApplicationUnhandledCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { + Open_im_sdkGetGroupApplicationUnhandledCount(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) + } } public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol { diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index 8d06b73..da915be 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,7 +17,7 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.8.3+3' + s.dependency 'OpenIMSDKCore','3.8.3-hotfix.7' s.static_framework = true s.library = 'resolv' diff --git a/lib/src/manager/im_conversation_manager.dart b/lib/src/manager/im_conversation_manager.dart index cbbb6b2..2cd39a2 100644 --- a/lib/src/manager/im_conversation_manager.dart +++ b/lib/src/manager/im_conversation_manager.dart @@ -4,8 +4,6 @@ import 'dart:developer'; import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; -import '../models/update_req.dart'; - class ConversationManager { MethodChannel _channel; late OnConversationListener listener; diff --git a/lib/src/manager/im_friendship_manager.dart b/lib/src/manager/im_friendship_manager.dart index e132805..5d3c310 100644 --- a/lib/src/manager/im_friendship_manager.dart +++ b/lib/src/manager/im_friendship_manager.dart @@ -3,8 +3,6 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; -import '../models/update_req.dart'; - class FriendshipManager { MethodChannel _channel; late OnFriendshipListener listener; @@ -51,22 +49,36 @@ class FriendshipManager { })); /// Get Friend Requests Sent to Me - Future> getFriendApplicationListAsRecipient({String? operationID}) => _channel - .invokeMethod( - 'getFriendApplicationListAsRecipient', - _buildParam({ - "operationID": Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); + Future> getFriendApplicationListAsRecipient( + {GetFriendApplicationListAsRecipientReq? req, String? operationID}) { + if (req != null && req.offset > 0) { + assert(req.count > 0, 'count must be greater than 0'); + } + return _channel + .invokeMethod( + 'getFriendApplicationListAsRecipient', + _buildParam({ + 'req': req?.toJson() ?? {}, + "operationID": Utils.checkOperationID(operationID), + })) + .then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); + } /// Get Friend Requests Sent by Me - Future> getFriendApplicationListAsApplicant({String? operationID}) => _channel - .invokeMethod( - 'getFriendApplicationListAsApplicant', - _buildParam({ - "operationID": Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); + Future> getFriendApplicationListAsApplicant( + {GetFriendApplicationListAsApplicantReq? req, String? operationID}) { + if (req != null && req.offset > 0) { + assert(req.count > 0, 'count must be greater than 0'); + } + return _channel + .invokeMethod( + 'getFriendApplicationListAsApplicant', + _buildParam({ + 'req': req?.toJson() ?? {}, + "operationID": Utils.checkOperationID(operationID), + })) + .then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); + } /// Get Friend List, including friends who have been put into the blacklist Future> getFriendList({ diff --git a/lib/src/manager/im_group_manager.dart b/lib/src/manager/im_group_manager.dart index 15eee11..b8c6a14 100644 --- a/lib/src/manager/im_group_manager.dart +++ b/lib/src/manager/im_group_manager.dart @@ -2,7 +2,6 @@ import 'dart:developer'; import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; -import 'package:flutter_openim_sdk/src/models/set_group_member_info.dart'; class GroupManager { MethodChannel _channel; @@ -257,22 +256,41 @@ class GroupManager { })); /// Handle group membership applications received as a group owner or administrator - Future> getGroupApplicationListAsRecipient({String? operationID}) => _channel - .invokeMethod( - 'getGroupApplicationListAsRecipient', - _buildParam({ - 'operationID': Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); + Future> getGroupApplicationListAsRecipient({ + GetGroupApplicationListAsRecipientReq? req, + String? operationID, + }) { + if (req != null && req.offset > 0) { + assert(req.count > 0, 'count must be greater than 0'); + } + return _channel + .invokeMethod( + 'getGroupApplicationListAsRecipient', + _buildParam({ + 'req': req?.toJson() ?? {}, + "operationID": Utils.checkOperationID(operationID), + })) + .then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); + } /// Get the list of group membership applications sent by the user - Future> getGroupApplicationListAsApplicant({String? operationID}) => _channel - .invokeMethod( - 'getGroupApplicationListAsApplicant', - _buildParam({ - 'operationID': Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); + Future> getGroupApplicationListAsApplicant({ + GetGroupApplicationListAsApplicantReq? req, + String? operationID, + }) { + if (req != null && req.offset > 0) { + assert(req.count > 0, 'count must be greater than 0'); + } + + return _channel + .invokeMethod( + 'getGroupApplicationListAsApplicant', + _buildParam({ + 'req': req?.toJson() ?? {}, + "operationID": Utils.checkOperationID(operationID), + })) + .then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); + } /// Accept a group membership application as an administrator or group owner /// Note: Membership applications require approval from administrators or the group. diff --git a/lib/src/models/group_info.dart b/lib/src/models/group_info.dart index df65b13..ccb91b8 100644 --- a/lib/src/models/group_info.dart +++ b/lib/src/models/group_info.dart @@ -422,3 +422,90 @@ class GroupInviteResult { return data; } } + +class GetGroupApplicationListAsRecipientReq { + final List groupIDs; + final List handleResults; + final int offset; + final int count; + + GetGroupApplicationListAsRecipientReq({ + this.groupIDs = const [], + this.handleResults = const [], + required this.offset, + required this.count, + }); + + GetGroupApplicationListAsRecipientReq.fromJson(Map json) + : groupIDs = json['groupIDs'] == null ? [] : List.from(json['groupIDs'].map((x) => x)), + handleResults = json['handleResults'] == null ? [] : List.from(json['handleResults'].map((x) => x)), + offset = json['offset'], + count = json['count']; + + Map toJson() { + final data = {}; + data['groupIDs'] = groupIDs; + data['handleResults'] = handleResults; + data['offset'] = offset; + data['count'] = count; + return data; + } + + @override + String toString() { + return 'GetGroupApplicationListAsRecipientReq{groupIDs: $groupIDs, handleResults: $handleResults, offset: $offset, count: $count}'; + } +} + +class GetGroupApplicationListAsApplicantReq { + final List groupIDs; + final List handleResults; + final int offset; + final int count; + + GetGroupApplicationListAsApplicantReq({ + this.groupIDs = const [], + this.handleResults = const [], + required this.offset, + required this.count, + }); + + GetGroupApplicationListAsApplicantReq.fromJson(Map json) + : groupIDs = json['groupIDs'] == null ? [] : List.from(json['groupIDs'].map((x) => x)), + handleResults = json['handleResults'] == null ? [] : List.from(json['handleResults'].map((x) => x)), + offset = json['offset'], + count = json['count']; + + Map toJson() { + final data = {}; + data['groupIDs'] = groupIDs; + data['handleResults'] = handleResults; + data['offset'] = offset; + data['count'] = count; + return data; + } + + @override + String toString() { + return 'GetGroupApplicationListAsApplicantReq{groupIDs: $groupIDs, handleResults: $handleResults, offset: $offset, count: $count}'; + } +} + +class GetGroupApplicationUnhandledCountReq { + final int time; + + GetGroupApplicationUnhandledCountReq({this.time = 0}); + + GetGroupApplicationUnhandledCountReq.fromJson(Map json) : time = json['time']; + + Map toJson() { + final data = {}; + data['time'] = time; + return data; + } + + @override + String toString() { + return 'GetGroupApplicationUnhandledCountReq{time: $time}'; + } +} diff --git a/lib/src/models/search_info.dart b/lib/src/models/search_info.dart index 0748239..70fd776 100644 --- a/lib/src/models/search_info.dart +++ b/lib/src/models/search_info.dart @@ -124,6 +124,6 @@ class SearchFriendsInfo extends FriendInfo { Map toJson() { final data = super.toJson(); data['relationship'] = this.relationship; - return data ?? {}; + return data; } } diff --git a/lib/src/models/user_info.dart b/lib/src/models/user_info.dart index 7f3e463..9145e69 100644 --- a/lib/src/models/user_info.dart +++ b/lib/src/models/user_info.dart @@ -423,3 +423,78 @@ class UserStatusInfo { return data; } } + +class GetFriendApplicationListAsRecipientReq { + final List handleResults; + final int offset; + final int count; + + GetFriendApplicationListAsRecipientReq({ + this.handleResults = const [], + required this.offset, + required this.count, + }); + + GetFriendApplicationListAsRecipientReq.fromJson(Map json) + : handleResults = json['handleResults'] == null ? [] : List.from(json['handleResults'].map((x) => x)), + offset = json['offset'], + count = json['count']; + + Map toJson() { + final data = {}; + data['handleResults'] = handleResults; + data['offset'] = offset; + data['count'] = count; + return data; + } + + @override + String toString() { + return 'GetFriendApplicationListAsRecipientReq{handleResults: $handleResults, offset: $offset, count: $count}'; + } +} + +class GetFriendApplicationListAsApplicantReq { + final int offset; + final int count; + + GetFriendApplicationListAsApplicantReq({ + required this.offset, + required this.count, + }); + + GetFriendApplicationListAsApplicantReq.fromJson(Map json) + : offset = json['offset'], + count = json['count']; + + Map toJson() { + final data = {}; + data['offset'] = offset; + data['count'] = count; + return data; + } + + @override + String toString() { + return 'GetFriendApplicationListAsApplicantReq{offset: $offset, count: $count}'; + } +} + +class GetFriendApplicationUnhandledCountReq { + final int time; + + GetFriendApplicationUnhandledCountReq({this.time = 0}); + + GetFriendApplicationUnhandledCountReq.fromJson(Map json) : time = json['time']; + + Map toJson() { + final data = {}; + data['time'] = time; + return data; + } + + @override + String toString() { + return 'GetSelfUnhandledApplyCountReq{time: $time}'; + } +} diff --git a/lib/src/openim.dart b/lib/src/openim.dart index e8fe9fe..c4f7a19 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.3.1'; + static const version = '3.8.3+hotfix.7'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 0148832..dd171a5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.3.1 +version: 3.8.3+hotfix.7 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter From 6cf7b54e24b0328f69b9231b83f9d70b94c889c7 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Mon, 15 Sep 2025 11:16:02 +0800 Subject: [PATCH 14/18] Inviting users to join a group results in an error (#219) --- lib/src/manager/im_group_manager.dart | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/src/manager/im_group_manager.dart b/lib/src/manager/im_group_manager.dart index b8c6a14..7a3b2d8 100644 --- a/lib/src/manager/im_group_manager.dart +++ b/lib/src/manager/im_group_manager.dart @@ -18,22 +18,20 @@ class GroupManager { /// Invite users to a group, allowing them to join without approval. /// [groupID] Group ID /// [userIDList] List of user IDs - Future> inviteUserToGroup({ + Future inviteUserToGroup({ required String groupID, required List userIDList, String? reason, String? operationID, }) => - _channel - .invokeMethod( - 'inviteUserToGroup', - _buildParam({ - 'groupID': groupID, - 'userIDList': userIDList, - 'reason': reason, - "operationID": Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupInviteResult.fromJson(map))); + _channel.invokeMethod( + 'inviteUserToGroup', + _buildParam({ + 'groupID': groupID, + 'userIDList': userIDList, + 'reason': reason, + "operationID": Utils.checkOperationID(operationID), + })); /// Remove group members /// [groupID] Group ID From 169affa005c1d5e406ea8db14ba673b107f25271 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Mon, 15 Sep 2025 17:30:30 +0800 Subject: [PATCH 15/18] AGP8 --- android/.gitignore | 1 + android/build.gradle | 57 +- android/gradle.properties | 4 - .../gradle/wrapper/gradle-wrapper.properties | 5 - .../openim/core-sdk/0.0.1/core-sdk-0.0.1.pom | 9 - android/src/main/AndroidManifest.xml | 7 +- .../FlutterOpenimSdkPluginTest.java | 33 + example/android/.gitignore | 3 +- example/android/app/build.gradle | 58 -- example/android/app/build.gradle.kts | 44 ++ .../android/app/src/main/AndroidManifest.xml | 2 +- .../MainActivity.java | 6 + .../com/example/example/MainActivity.kt | 5 - example/android/build.gradle | 18 - example/android/build.gradle.kts | 21 + .../reports/problems/problems-report.html | 663 ++++++++++++++++++ example/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 25 - example/android/settings.gradle.kts | 25 + example/lib/main.dart | 24 +- example/pubspec.lock | 78 +-- example/test/widget_test.dart | 2 +- ios/Resources/PrivacyInfo.xcprivacy | 23 + ios/flutter_openim_sdk.podspec | 2 + 25 files changed, 909 insertions(+), 210 deletions(-) delete mode 100644 android/gradle.properties delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom create mode 100644 android/src/test/java/com/example/flutter_openim_sdk/FlutterOpenimSdkPluginTest.java delete mode 100644 example/android/app/build.gradle create mode 100644 example/android/app/build.gradle.kts create mode 100644 example/android/app/src/main/java/com/example/flutter_openim_sdk_example/MainActivity.java delete mode 100644 example/android/app/src/main/kotlin/com/example/example/MainActivity.kt delete mode 100644 example/android/build.gradle create mode 100644 example/android/build.gradle.kts create mode 100644 example/android/build/reports/problems/problems-report.html delete mode 100644 example/android/settings.gradle create mode 100644 example/android/settings.gradle.kts create mode 100644 ios/Resources/PrivacyInfo.xcprivacy diff --git a/android/.gitignore b/android/.gitignore index c6cbe56..161bdcd 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -6,3 +6,4 @@ .DS_Store /build /captures +.cxx diff --git a/android/build.gradle b/android/build.gradle index e517fa6..e1a45b9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,30 +1,14 @@ -group 'io.openim.flutter_openim_sdk' -version '1.0' - -def dir = getCurrentProjectDir() - -def getCurrentProjectDir() { - String result = "" - rootProject.allprojects { project -> - if (project.properties.get("name").toString() == "flutter_openim_sdk") { - result = project.properties.get("projectDir").toString() - } - } - return result -} +group = "io.openim.flutter_openim_sdk" +version = "1.0" buildscript { repositories { - maven { url 'https://maven.aliyun.com/repository/public' } - maven { url 'https://maven.aliyun.com/repository/central' } - maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } - maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath("com.android.tools.build:gradle:8.7.3") } } @@ -35,20 +19,35 @@ rootProject.allprojects { } } -apply plugin: 'com.android.library' +apply plugin: "com.android.library" android { - compileSdkVersion 34 + namespace = "io.openim.flutter_openim_sdk" + + compileSdk = 35 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } defaultConfig { - minSdkVersion 21 + minSdk = 21 } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + + dependencies { + implementation 'io.openim:core-sdk:3.8.3-patch7@aar' + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } } } - -dependencies { - implementation 'io.openim:core-sdk:3.8.3-patch7@aar' -} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index be9024e..0000000 --- a/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableDexingArtifactTransform=false \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 3c9d085..0000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom b/android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom deleted file mode 100644 index 41a78bc..0000000 --- a/android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - - io.openim - core-sdk - 0.0.1 - diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 7d4bb9e..20bc59f 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,6 +1,3 @@ - - - - \ No newline at end of file + package="io.openim.flutter_openim_sdk"> + diff --git a/android/src/test/java/com/example/flutter_openim_sdk/FlutterOpenimSdkPluginTest.java b/android/src/test/java/com/example/flutter_openim_sdk/FlutterOpenimSdkPluginTest.java new file mode 100644 index 0000000..86b84ad --- /dev/null +++ b/android/src/test/java/com/example/flutter_openim_sdk/FlutterOpenimSdkPluginTest.java @@ -0,0 +1,33 @@ +package io.openim.flutter_openim_sdk; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import org.junit.Test; + +/** + * This demonstrates a simple unit test of the Java portion of this plugin's + * implementation. + * + * Once you have built the plugin's example app, you can run these tests from + * the command + * line by running `./gradlew testDebugUnitTest` in the `example/android/` + * directory, or + * you can run them directly from IDEs that support JUnit such as Android + * Studio. + */ + +public class FlutterOpenimSdkPluginTest { + @Test + public void onMethodCall_getPlatformVersion_returnsExpectedValue() { + FlutterOpenimSdkPlugin plugin = new FlutterOpenimSdkPlugin(); + + final MethodCall call = new MethodCall("getPlatformVersion", null); + MethodChannel.Result mockResult = mock(MethodChannel.Result.class); + plugin.onMethodCall(call, mockResult); + + verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE); + } +} diff --git a/example/android/.gitignore b/example/android/.gitignore index 6f56801..be3943c 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -5,9 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index 2a2d082..0000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,58 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file("local.properties") -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader("UTF-8") { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty("flutter.versionCode") -if (flutterVersionCode == null) { - flutterVersionCode = "1" -} - -def flutterVersionName = localProperties.getProperty("flutter.versionName") -if (flutterVersionName == null) { - flutterVersionName = "1.0" -} - -android { - namespace = "com.example.example" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutterVersionCode.toInteger() - versionName = flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug - } - } -} - -flutter { - source = "../.." -} diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts new file mode 100644 index 0000000..872c58f --- /dev/null +++ b/example/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "io.openim.flutter_openim_sdk_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.openim.flutter_openim_sdk_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 74a78b9..f71f020 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ ("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/example/android/build/reports/problems/problems-report.html b/example/android/build/reports/problems/problems-report.html new file mode 100644 index 0000000..9da070b --- /dev/null +++ b/example/android/build/reports/problems/problems-report.html @@ -0,0 +1,663 @@ + + + + + + + + + + + + + Gradle Configuration Cache + + + +
+ +
+ Loading... +
+ + + + + + diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 3b5b324..f018a61 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index e1ca574..ac3b479 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 536165d..0000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.7.10" apply false -} - -include ":app" diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts new file mode 100644 index 0000000..ab39a10 --- /dev/null +++ b/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.3" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app") diff --git a/example/lib/main.dart b/example/lib/main.dart index 554deef..0cd5267 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,12 +2,14 @@ import 'package:flutter/material.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; void main() { - runApp(MyApp()); + runApp(const MyApp()); } class MyApp extends StatefulWidget { + const MyApp({super.key}); + @override - _MyAppState createState() => _MyAppState(); + State createState() => _MyAppState(); } class _MyAppState extends State { @@ -15,11 +17,17 @@ class _MyAppState extends State { void initState() { super.initState(); OpenIM.iMManager.initSDK( - platformID: 1, - apiAddr: '', - wsAddr: '', - dataDir: '/', - listener: OnConnectListener()); + platformID: 2, + apiAddr: 'https://www.openim.io/api', + wsAddr: 'https://www.openim.io/', + dataDir: '/', + listener: OnConnectListener(), + ); + OpenIM.iMManager.messageManager.customBusinessListener = OnCustomBusinessListener( + onRecvCustomBusinessMessage: (message) {}, + ); + + OpenIM.iMManager.login(userID: '123', token: '123'); } @override @@ -31,7 +39,7 @@ class _MyAppState extends State { ), body: Column( children: [ - TextButton(onPressed: () {}, child: Text('login')), + TextButton(onPressed: () {}, child: const Text('login')), ], ), ), diff --git a/example/pubspec.lock b/example/pubspec.lock index 897e12c..93bd591 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,42 +5,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" cupertino_icons: dependency: "direct main" description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" flutter: dependency: "direct main" description: flutter @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "3.8.3+hotfix.3" + version: "3.8.3+hotfix.7" flutter_test: dependency: "direct dev" description: flutter @@ -86,18 +86,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -118,10 +118,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -134,71 +134,71 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" vector_math: dependency: transitive description: @@ -211,10 +211,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "15.0.0" sdks: - dart: ">=3.4.4 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index f376c56..48ebcae 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:flutter_openim_sdk_example/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); + await tester.pumpWidget(const MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); diff --git a/ios/Resources/PrivacyInfo.xcprivacy b/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..e19fdbc --- /dev/null +++ b/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,23 @@ + + + + + NSPrivacyTracking + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index da915be..d0ebaa3 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -25,4 +25,6 @@ A new Flutter project. # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' } s.swift_version = '5.0' + + s.resource_bundles = {'flutter_openim_sdk_privacy' => ['Resources/PrivacyInfo.xcprivacy']} end From 1d27e9bc9879d9c73191545281fc459e3f9ac05d Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:41:16 +0800 Subject: [PATCH 16/18] fix: file path. --- .../openim}/flutter_openim_sdk_example/MainActivity.java | 0 example/lib/main.dart | 2 -- 2 files changed, 2 deletions(-) rename example/android/app/src/main/java/{com/example => io/openim}/flutter_openim_sdk_example/MainActivity.java (100%) diff --git a/example/android/app/src/main/java/com/example/flutter_openim_sdk_example/MainActivity.java b/example/android/app/src/main/java/io/openim/flutter_openim_sdk_example/MainActivity.java similarity index 100% rename from example/android/app/src/main/java/com/example/flutter_openim_sdk_example/MainActivity.java rename to example/android/app/src/main/java/io/openim/flutter_openim_sdk_example/MainActivity.java diff --git a/example/lib/main.dart b/example/lib/main.dart index 0cd5267..f4d19c7 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -26,8 +26,6 @@ class _MyAppState extends State { OpenIM.iMManager.messageManager.customBusinessListener = OnCustomBusinessListener( onRecvCustomBusinessMessage: (message) {}, ); - - OpenIM.iMManager.login(userID: '123', token: '123'); } @override From afb98bf399dc3370677986e9211ba1ac93bf0b1b Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Wed, 22 Oct 2025 09:40:18 +0800 Subject: [PATCH 17/18] feat: https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10 --- .idea/libraries/Dart_SDK.xml | 44 ++++++----- .idea/misc.xml | 4 + CHANGELOG.md | 4 + android/build.gradle | 2 +- example/.gitignore | 2 + example/ios/Podfile.lock | 10 +-- example/ios/Runner.xcodeproj/project.pbxproj | 18 +++++ .../xcshareddata/xcschemes/Runner.xcscheme | 3 + example/pubspec.lock | 2 +- ios/flutter_openim_sdk.podspec | 2 +- lib/src/openim.dart | 2 +- pubspec.lock | 76 +++++++++---------- pubspec.yaml | 4 +- 13 files changed, 103 insertions(+), 70 deletions(-) diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index db4f9a0..bbb2887 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,27 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml index 9cbc368..2d8500d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,10 @@ + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b7a8d0..ffa28d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3+hotfix.10 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10) + ## 3.8.3+hotfix.7 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.7) diff --git a/android/build.gradle b/android/build.gradle index e1a45b9..1197098 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,7 +36,7 @@ android { } dependencies { - implementation 'io.openim:core-sdk:3.8.3-patch7@aar' + implementation 'io.openim:core-sdk:3.8.3-patch10@aar' testImplementation("junit:junit:4.13.2") testImplementation("org.mockito:mockito-core:5.0.0") } diff --git a/example/.gitignore b/example/.gitignore index 29a3a50..79c113f 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 7bb90dd..7eb6643 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2,8 +2,8 @@ PODS: - Flutter (1.0.0) - flutter_openim_sdk (0.0.1): - Flutter - - OpenIMSDKCore (= 3.8.2) - - OpenIMSDKCore (3.8.2) + - OpenIMSDKCore (= 3.8.3-hotfix.10) + - OpenIMSDKCore (3.8.3-hotfix.10) DEPENDENCIES: - Flutter (from `Flutter`) @@ -21,9 +21,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_openim_sdk: 77bdd08fb8dda1644a0c150b8ba7324f11b32404 - OpenIMSDKCore: aaffd63079a874d9272b8b962598723cb8128d32 + flutter_openim_sdk: 59aa0c08eb7499a1790168e10539e4dd915ced6e + OpenIMSDKCore: bc9a6e5de2aabed76e4f69fe06a7c9df1d945afc PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index b9e7c52..d7570d1 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -198,6 +198,7 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 477B57FDE7C120496D1FEA7A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -307,6 +308,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 477B57FDE7C120496D1FEA7A /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 70DBF52745AF25A4FC72D8C3 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 8e3ca5d..e3773d4 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/example/pubspec.lock b/example/pubspec.lock index 93bd591..9f0b254 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "3.8.3+hotfix.7" + version: "3.8.3+hotfix.10" flutter_test: dependency: "direct dev" description: flutter diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index d0ebaa3..c869fff 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,7 +17,7 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.8.3-hotfix.7' + s.dependency 'OpenIMSDKCore','3.8.3-hotfix.10' s.static_framework = true s.library = 'resolv' diff --git a/lib/src/openim.dart b/lib/src/openim.dart index c4f7a19..3bfb6e3 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.7'; + static const version = '3.8.3+hotfix.10'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.lock b/pubspec.lock index df9b838..f4bbb72 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,50 +5,50 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" flutter: dependency: "direct main" description: flutter @@ -63,18 +63,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -87,10 +87,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -103,71 +103,71 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" vector_math: dependency: transitive description: @@ -180,10 +180,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "15.0.0" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml index dd171a5..a3c171b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.7 +version: 3.8.3+hotfix.10 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - + dev_dependencies: flutter_test: sdk: flutter From 0a175bb8b1eb8d4a40c66107ca77a2ff33212bf9 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Fri, 24 Oct 2025 11:01:38 +0800 Subject: [PATCH 18/18] feat: https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10 --- CHANGELOG.md | 4 +++ lib/src/manager/im_friendship_manager.dart | 11 +++++++ lib/src/manager/im_group_manager.dart | 37 ++++++++++++++++------ lib/src/openim.dart | 2 +- pubspec.yaml | 2 +- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffa28d1..829beed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3+hotfix.10.1 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10) + ## 3.8.3+hotfix.10 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10) diff --git a/lib/src/manager/im_friendship_manager.dart b/lib/src/manager/im_friendship_manager.dart index 5d3c310..36234f2 100644 --- a/lib/src/manager/im_friendship_manager.dart +++ b/lib/src/manager/im_friendship_manager.dart @@ -299,6 +299,17 @@ class FriendshipManager { .then((value) => value); } + Future getFriendApplicationUnhandledCount(GetFriendApplicationUnhandledCountReq req, + {String? operationID}) => + _channel + .invokeMethod( + 'getFriendApplicationUnhandledCount', + _buildParam({ + 'req': req.toJson(), + 'operationID': Utils.checkOperationID(operationID), + })) + .then((value) => int.parse(value)); + static Map _buildParam(Map param) { param["ManagerName"] = "friendshipManager"; param = Utils.cleanMap(param); diff --git a/lib/src/manager/im_group_manager.dart b/lib/src/manager/im_group_manager.dart index 7a3b2d8..b14fceb 100644 --- a/lib/src/manager/im_group_manager.dart +++ b/lib/src/manager/im_group_manager.dart @@ -127,15 +127,17 @@ class GroupManager { })) .then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map))); - Future> getJoinedGroupListPage({String? operationID, int offset = 0, int count = 40}) => _channel - .invokeMethod( - 'getJoinedGroupListPage', - _buildParam({ - 'offset': offset, - 'count': count, - 'operationID': Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map))); + Future> getJoinedGroupListPage( + {String? operationID, int offset = 0, int count = 40}) => + _channel + .invokeMethod( + 'getJoinedGroupListPage', + _buildParam({ + 'offset': offset, + 'count': count, + 'operationID': Utils.checkOperationID(operationID), + })) + .then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map))); /// Query the list of joined groups Future> getJoinedGroupListMap({String? operationID}) => _channel @@ -214,7 +216,11 @@ class GroupManager { /// Apply to join a group, requiring approval from an administrator or the group. /// [joinSource] 2: Invited, 3: Searched, 4: Using a QR code Future joinGroup( - {required String groupID, String? reason, String? operationID, int joinSource = 3, String? ex}) => + {required String groupID, + String? reason, + String? operationID, + int joinSource = 3, + String? ex}) => _channel.invokeMethod( 'joinGroup', _buildParam({ @@ -599,6 +605,17 @@ class GroupManager { 'operationID': Utils.checkOperationID(operationID), })); + Future getGroupApplicationUnhandledCount(GetGroupApplicationUnhandledCountReq req, + {String? operationID}) => + _channel + .invokeMethod( + 'getGroupApplicationUnhandledCount', + _buildParam({ + 'req': req.toJson(), + 'operationID': Utils.checkOperationID(operationID), + })) + .then((value) => int.parse(value)); + static Map _buildParam(Map param) { param["ManagerName"] = "groupManager"; param = Utils.cleanMap(param); diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 3bfb6e3..82d932d 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.10'; + static const version = '3.8.3+hotfix.10.1'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index a3c171b..b7fd63e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.10 +version: 3.8.3+hotfix.10.1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter