no message
This commit is contained in:
@@ -15,6 +15,9 @@ class ConversationInfo {
|
||||
// Group ID in case of a group chat
|
||||
String? groupID;
|
||||
|
||||
// Channel ID in case of a channel chat
|
||||
String? channelID;
|
||||
|
||||
// Display name or nickname
|
||||
String? showName;
|
||||
|
||||
@@ -69,6 +72,7 @@ class ConversationInfo {
|
||||
this.conversationType,
|
||||
this.userID,
|
||||
this.groupID,
|
||||
this.channelID,
|
||||
this.showName,
|
||||
this.faceURL,
|
||||
this.recvMsgOpt,
|
||||
@@ -91,6 +95,7 @@ class ConversationInfo {
|
||||
conversationType = json['conversationType'];
|
||||
userID = json['userID'];
|
||||
groupID = json['groupID'];
|
||||
channelID = json['channelID'];
|
||||
showName = json['showName'];
|
||||
faceURL = json['faceURL'];
|
||||
recvMsgOpt = json['recvMsgOpt'];
|
||||
@@ -122,6 +127,7 @@ class ConversationInfo {
|
||||
data['conversationType'] = this.conversationType;
|
||||
data['userID'] = this.userID;
|
||||
data['groupID'] = this.groupID;
|
||||
data['channelID'] = this.channelID;
|
||||
data['showName'] = this.showName;
|
||||
data['faceURL'] = this.faceURL;
|
||||
data['recvMsgOpt'] = this.recvMsgOpt;
|
||||
@@ -147,6 +153,10 @@ class ConversationInfo {
|
||||
// Check if it's a group chat
|
||||
bool get isGroupChat => conversationType == ConversationType.group || conversationType == ConversationType.superGroup;
|
||||
|
||||
// Check if it's a channel chat
|
||||
bool get isChannelChat => conversationType == ConversationType.superChannel;
|
||||
|
||||
|
||||
// Check if it's a valid conversation (not in a group if isNotInGroup is true)
|
||||
bool get isValid => isSingleChat || (isGroupChat && !isNotInGroup!);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user