This commit is contained in:
hrxiang
2022-06-16 12:18:15 +08:00
parent 8abc8e4399
commit e2b546f400
6 changed files with 37 additions and 2 deletions

View File

@@ -261,6 +261,21 @@ class ConversationManager {
Future<dynamic> getAtAllTag() =>
_channel.invokeMethod('getAtAllTag', _buildParam({}));
/// Global Do Not Disturb
/// [status] 0: Normal. 1: Do not receive messages. 2: Do not notify when messages are received.
/// 全局免打扰
/// [status] 0正常1不接受消息2接受在线消息不接受离线消息
Future<dynamic> setGlobalRecvMessageOpt({
required int status,
String? operationID,
}) =>
_channel.invokeMethod(
'setGlobalRecvMessageOpt',
_buildParam({
"status": status,
"operationID": Utils.checkOperationID(operationID),
}));
/// Custom sort for conversation list
/// 会话列表自定义排序规则。
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list

View File

@@ -29,6 +29,9 @@ class UserInfo {
bool? isBlacklist;
/// 全局免打扰
int? globalRecvMsgOpt;
UserInfo({
this.publicInfo,
this.friendInfo,
@@ -46,6 +49,7 @@ class UserInfo {
this.ex,
this.createTime,
this.remark,
this.globalRecvMsgOpt,
});
// UserInfo.self(Map<String, dynamic> json) {
@@ -84,6 +88,7 @@ class UserInfo {
remark = json['remark'] ?? _remark;
ex = json['ex'] ?? _ex;
createTime = json['createTime'];
globalRecvMsgOpt = json['globalRecvMsgOpt'];
}
Map<String, dynamic> toJson() {
@@ -104,6 +109,7 @@ class UserInfo {
data['ex'] = this.ex;
data['createTime'] = this.createTime;
data['remark'] = this.remark;
data['globalRecvMsgOpt'] = this.globalRecvMsgOpt;
return data;
}