Upgrade
This commit is contained in:
parent
71897bcb4e
commit
8b4a35e6b7
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,12 +1,13 @@
|
||||
## 2.0.0+5
|
||||
|
||||
1.New oa notification </br>
|
||||
2.New method deleteConversationMsgFromLocalAndSvr </br>
|
||||
2.New method deleteMessageFromLocalAndSvr </br>
|
||||
3.New method deleteAllMsgFromLocal </br>
|
||||
3.New method deleteAllMsgFromLocalAndSvr </br>
|
||||
3.New method markMessageAsReadByConID </br>
|
||||
3.New method wakeUp </br>
|
||||
1.New notification </br>
|
||||
2.New deleteConversationMsgFromLocalAndSvr </br>
|
||||
3.New deleteMessageFromLocalAndSvr </br>
|
||||
4.New deleteAllMsgFromLocal </br>
|
||||
5.New deleteAllMsgFromLocalAndSvr </br>
|
||||
6.New markMessageAsReadByConID </br>
|
||||
7.New wakeUp </br>
|
||||
8.New group notification class</br>
|
||||
|
||||
## 2.0.0+4
|
||||
|
||||
|
@ -68,7 +68,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.0+3"
|
||||
version: "2.0.0+5"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -61,5 +61,7 @@ class MessageType {
|
||||
static const signalingNotification = 1601;
|
||||
static const signalingNotificationEnd = 1699;
|
||||
|
||||
static const burnAfterReadingNotification = 1701;
|
||||
|
||||
static const notificationEnd = 2000;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ class GroupMembersInfo {
|
||||
String? operatorUserID;
|
||||
String? ext;
|
||||
int? muteEndTime;
|
||||
int? appMangerLevel;
|
||||
|
||||
GroupMembersInfo({
|
||||
this.groupID,
|
||||
@ -85,6 +86,7 @@ class GroupMembersInfo {
|
||||
this.joinSource,
|
||||
this.operatorUserID,
|
||||
this.muteEndTime,
|
||||
this.appMangerLevel,
|
||||
});
|
||||
|
||||
GroupMembersInfo.fromJson(Map<String, dynamic> json) {
|
||||
@ -98,6 +100,7 @@ class GroupMembersInfo {
|
||||
joinSource = json['joinSource'];
|
||||
operatorUserID = json['operatorUserID'];
|
||||
muteEndTime = json['muteEndTime'];
|
||||
appMangerLevel = json['appMangerLevel'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@ -112,6 +115,7 @@ class GroupMembersInfo {
|
||||
data['joinSource'] = this.joinSource;
|
||||
data['operatorUserID'] = this.operatorUserID;
|
||||
data['muteEndTime'] = this.muteEndTime;
|
||||
data['appMangerLevel'] = this.appMangerLevel;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import '../../flutter_openim_sdk.dart';
|
||||
|
||||
/// OA notification
|
||||
/// oa 通知
|
||||
class OANotification {
|
||||
String? notificationName;
|
||||
String? notificationFaceURL;
|
||||
@ -79,3 +80,255 @@ class OANotification {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Group common notification
|
||||
class GroupNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
GroupMembersInfo? groupOwnerUser;
|
||||
List<GroupMembersInfo>? memberList;
|
||||
|
||||
GroupNotification({
|
||||
this.group,
|
||||
this.opUser,
|
||||
this.groupOwnerUser,
|
||||
this.memberList,
|
||||
});
|
||||
|
||||
GroupNotification.fromJson(Map<String, dynamic> 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;
|
||||
if (json['memberList'] != null) {
|
||||
memberList = <GroupMembersInfo>[];
|
||||
json['memberList'].forEach((v) {
|
||||
memberList!.add(GroupMembersInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.groupOwnerUser != null) {
|
||||
data['groupOwnerUser'] = this.groupOwnerUser!.toJson();
|
||||
}
|
||||
if (this.memberList != null) {
|
||||
data['memberList'] = this.memberList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// User is invited to the group notification
|
||||
/// 用户被邀请进群通知
|
||||
class InvitedJoinGroupNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
List<GroupMembersInfo>? invitedUserList;
|
||||
|
||||
InvitedJoinGroupNotification({this.group, this.opUser, this.invitedUserList});
|
||||
|
||||
InvitedJoinGroupNotification.fromJson(Map<String, dynamic> json) {
|
||||
group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null;
|
||||
opUser = json['opUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['opUser'])
|
||||
: null;
|
||||
if (json['invitedUserList'] != null) {
|
||||
invitedUserList = <GroupMembersInfo>[];
|
||||
json['invitedUserList'].forEach((v) {
|
||||
invitedUserList!.add(GroupMembersInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.invitedUserList != null) {
|
||||
data['invitedUserList'] =
|
||||
this.invitedUserList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Group kicked member notification
|
||||
/// 组踢出成员通知
|
||||
class KickedGroupMemeberNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
List<GroupMembersInfo>? kickedUserList;
|
||||
|
||||
KickedGroupMemeberNotification(
|
||||
{this.group, this.opUser, this.kickedUserList});
|
||||
|
||||
KickedGroupMemeberNotification.fromJson(Map<String, dynamic> json) {
|
||||
group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null;
|
||||
opUser = json['opUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['opUser'])
|
||||
: null;
|
||||
if (json['kickedUserList'] != null) {
|
||||
kickedUserList = <GroupMembersInfo>[];
|
||||
json['kickedUserList'].forEach((v) {
|
||||
kickedUserList!.add(GroupMembersInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.kickedUserList != null) {
|
||||
data['kickedUserList'] =
|
||||
this.kickedUserList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Exit group notification
|
||||
/// 退出群通知
|
||||
class QuitGroupNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? quitUser;
|
||||
|
||||
QuitGroupNotification({this.group, this.quitUser});
|
||||
|
||||
QuitGroupNotification.fromJson(Map<String, dynamic> json) {
|
||||
group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null;
|
||||
quitUser = json['quitUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['quitUser'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.quitUser != null) {
|
||||
data['quitUser'] = this.quitUser!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Group rights transfer noticication
|
||||
/// 群权转让通知
|
||||
class GroupRightsTransferNoticication {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
GroupMembersInfo? newGroupOwner;
|
||||
|
||||
GroupRightsTransferNoticication({
|
||||
this.group,
|
||||
this.opUser,
|
||||
this.newGroupOwner,
|
||||
});
|
||||
|
||||
GroupRightsTransferNoticication.fromJson(Map<String, dynamic> 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;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.newGroupOwner != null) {
|
||||
data['newGroupOwner'] = this.newGroupOwner!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Mute member notification
|
||||
/// 禁言成员通知
|
||||
class MuteMemberNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
GroupMembersInfo? mutedUser;
|
||||
|
||||
MuteMemberNotification({
|
||||
this.group,
|
||||
this.opUser,
|
||||
this.mutedUser,
|
||||
});
|
||||
|
||||
MuteMemberNotification.fromJson(Map<String, dynamic> 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;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.mutedUser != null) {
|
||||
data['mutedUser'] = this.mutedUser!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Burn after reading notification
|
||||
/// 阅后即焚通知
|
||||
class BurnAfterReadingNotification {
|
||||
String? recvID;
|
||||
String? sendID;
|
||||
bool? isPrivate;
|
||||
|
||||
BurnAfterReadingNotification({this.recvID, this.sendID, this.isPrivate});
|
||||
|
||||
BurnAfterReadingNotification.fromJson(Map<String, dynamic> json) {
|
||||
recvID = json['recvID'];
|
||||
sendID = json['sendID'];
|
||||
isPrivate = json['isPrivate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['recvID'] = this.recvID;
|
||||
data['sendID'] = this.sendID;
|
||||
data['isPrivate'] = this.isPrivate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -147,6 +147,16 @@ class UserInfo {
|
||||
if (value == null || value.trim().isEmpty) return null;
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is UserInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
userID == other.userID;
|
||||
|
||||
@override
|
||||
int get hashCode => userID.hashCode;
|
||||
}
|
||||
|
||||
class PublicUserInfo {
|
||||
|
Loading…
x
Reference in New Issue
Block a user