upgrade sdk,new add quote message
This commit is contained in:
parent
00e19f25c6
commit
d11fdfa0f7
@ -52,5 +52,5 @@ android {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
// implementation 'io.openim:client:0.0.13@aar'
|
// implementation 'io.openim:client:0.0.13@aar'
|
||||||
implementation 'io.openim:client-sdk:0.0.8@aar'
|
implementation 'io.openim:client-sdk:0.0.9@aar'
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ class MessageType {
|
|||||||
static const revoke = 111;
|
static const revoke = 111;
|
||||||
static const has_read_receipt = 112;
|
static const has_read_receipt = 112;
|
||||||
static const typing = 113;
|
static const typing = 113;
|
||||||
|
static const quote = 114;
|
||||||
|
|
||||||
///
|
///
|
||||||
static const accept_friend = 201;
|
static const accept_friend = 201;
|
||||||
|
@ -42,7 +42,7 @@ class MessageManager {
|
|||||||
required Message message,
|
required Message message,
|
||||||
String? userID,
|
String? userID,
|
||||||
String? groupID,
|
String? groupID,
|
||||||
required bool onlineUserOnly,
|
bool onlineUserOnly = false,
|
||||||
}) {
|
}) {
|
||||||
return _channel.invokeMethod(
|
return _channel.invokeMethod(
|
||||||
'sendMessage',
|
'sendMessage',
|
||||||
|
@ -28,6 +28,7 @@ class Message {
|
|||||||
AtElem? atElem;
|
AtElem? atElem;
|
||||||
LocationElem? locationElem;
|
LocationElem? locationElem;
|
||||||
CustomElem? customElem;
|
CustomElem? customElem;
|
||||||
|
QuoteElem? quoteElem;
|
||||||
|
|
||||||
Message({
|
Message({
|
||||||
this.clientMsgID,
|
this.clientMsgID,
|
||||||
@ -57,6 +58,7 @@ class Message {
|
|||||||
this.atElem,
|
this.atElem,
|
||||||
this.locationElem,
|
this.locationElem,
|
||||||
this.customElem,
|
this.customElem,
|
||||||
|
this.quoteElem,
|
||||||
});
|
});
|
||||||
|
|
||||||
Message.fromJson(Map<String, dynamic> json)
|
Message.fromJson(Map<String, dynamic> json)
|
||||||
@ -102,6 +104,9 @@ class Message {
|
|||||||
customElem = json['customElem'] != null
|
customElem = json['customElem'] != null
|
||||||
? CustomElem.fromJson(json['customElem'])
|
? CustomElem.fromJson(json['customElem'])
|
||||||
: null;
|
: null;
|
||||||
|
quoteElem = json['quoteElem'] != null
|
||||||
|
? QuoteElem.fromJson(json['quoteElem'])
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -133,24 +138,22 @@ class Message {
|
|||||||
data['atElem'] = this.atElem?.toJson();
|
data['atElem'] = this.atElem?.toJson();
|
||||||
data['locationElem'] = this.locationElem?.toJson();
|
data['locationElem'] = this.locationElem?.toJson();
|
||||||
data['customElem'] = this.customElem?.toJson();
|
data['customElem'] = this.customElem?.toJson();
|
||||||
|
data['quoteElem'] = this.quoteElem?.toJson();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
// TODO: implement ==
|
|
||||||
if (other is Message) {
|
if (other is Message) {
|
||||||
return other._id == _id;
|
return other._id == _id;
|
||||||
}
|
}
|
||||||
return super == other;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// TODO: implement hashCode
|
|
||||||
int get hashCode => super.hashCode;
|
int get hashCode => super.hashCode;
|
||||||
|
|
||||||
String? get _id =>
|
String? get _id => clientMsgID;
|
||||||
clientMsgID == null || clientMsgID!.isEmpty ? serverMsgID : clientMsgID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class PictureElem {
|
class PictureElem {
|
||||||
@ -426,6 +429,27 @@ class CustomElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class QuoteElem {
|
||||||
|
String? text;
|
||||||
|
Message? quoteMessage;
|
||||||
|
|
||||||
|
QuoteElem({this.text, this.quoteMessage});
|
||||||
|
|
||||||
|
QuoteElem.fromJson(Map<String, dynamic> json) {
|
||||||
|
text = json['text'];
|
||||||
|
if (json['quoteMessage'] is Map) {
|
||||||
|
quoteMessage = Message.fromJson(json['quoteMessage']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['text'] = this.text;
|
||||||
|
data['quoteMessage'] = this.quoteMessage?.toJson();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class HaveReadInfo {
|
class HaveReadInfo {
|
||||||
String? uid;
|
String? uid;
|
||||||
List<String>? msgIDList;
|
List<String>? msgIDList;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user