From 3e0346030039f7df73e7d7ed4b2ffedf8905be74 Mon Sep 17 00:00:00 2001 From: hrxiang Date: Tue, 8 Nov 2022 12:04:09 +0800 Subject: [PATCH] Fix bug --- lib/src/models/user_info.dart | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/src/models/user_info.dart b/lib/src/models/user_info.dart index 8ce36d4..f4c799d 100644 --- a/lib/src/models/user_info.dart +++ b/lib/src/models/user_info.dart @@ -53,8 +53,14 @@ class UserInfo { /// 全局免打扰 0:正常;1:不接受消息;2:接受在线消息不接受离线消息; int? globalRecvMsgOpt; - /// 是允许添加为好友 - bool? isAllowAddFriend; + /// 是允许添加为好友 1:允许,2:否 + int? allowAddFriend; + + /// 新消息铃声 1:允许,2:否 + int? allowBeep; + + /// 新消息震动 1:允许,2:否 + int? allowVibration; UserInfo({ this.publicInfo, @@ -74,7 +80,9 @@ class UserInfo { this.createTime, this.remark, this.globalRecvMsgOpt, - this.isAllowAddFriend, + this.allowAddFriend, + this.allowBeep, + this.allowVibration, }); // UserInfo.self(Map json) { @@ -114,7 +122,9 @@ class UserInfo { ex = json['ex'] ?? _ex; createTime = json['createTime']; globalRecvMsgOpt = json['globalRecvMsgOpt']; - isAllowAddFriend = json['isAllowAddFriend']; + allowAddFriend = json['allowAddFriend']; + allowBeep = json['allowBeep']; + allowVibration = json['allowVibration']; } Map toJson() { @@ -136,7 +146,9 @@ class UserInfo { data['createTime'] = this.createTime; data['remark'] = this.remark; data['globalRecvMsgOpt'] = this.globalRecvMsgOpt; - data['isAllowAddFriend'] = this.isAllowAddFriend; + data['allowAddFriend'] = this.allowAddFriend; + data['allowBeep'] = this.allowBeep; + data['allowVibration'] = this.allowVibration; return data; }