show sender-user in message_view
This commit is contained in:
@@ -58,3 +58,29 @@ class ChannelWithSubscription {
|
||||
return jsonArr.map<ChannelWithSubscription>((e) => ChannelWithSubscription.fromJson(e as Map<String, dynamic>)).toList();
|
||||
}
|
||||
}
|
||||
|
||||
class ChannelPreview {
|
||||
final String channelID;
|
||||
final String ownerUserID;
|
||||
final String internalName;
|
||||
final String displayName;
|
||||
final String? descriptionName;
|
||||
|
||||
const ChannelPreview({
|
||||
required this.channelID,
|
||||
required this.ownerUserID,
|
||||
required this.internalName,
|
||||
required this.displayName,
|
||||
required this.descriptionName,
|
||||
});
|
||||
|
||||
factory ChannelPreview.fromJson(Map<String, dynamic> json) {
|
||||
return ChannelPreview(
|
||||
channelID: json['channel_id'] as String,
|
||||
ownerUserID: json['owner_user_id'] as String,
|
||||
internalName: json['internal_name'] as String,
|
||||
displayName: json['display_name'] as String,
|
||||
descriptionName: json['description_name'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -39,3 +39,32 @@ class KeyToken {
|
||||
return jsonArr.map<KeyToken>((e) => KeyToken.fromJson(e as Map<String, dynamic>)).toList();
|
||||
}
|
||||
}
|
||||
|
||||
class KeyTokenPreview {
|
||||
final String keytokenID;
|
||||
final String name;
|
||||
final String ownerUserID;
|
||||
final bool allChannels;
|
||||
final List<String> channels;
|
||||
final String permissions;
|
||||
|
||||
const KeyTokenPreview({
|
||||
required this.keytokenID,
|
||||
required this.name,
|
||||
required this.ownerUserID,
|
||||
required this.allChannels,
|
||||
required this.channels,
|
||||
required this.permissions,
|
||||
});
|
||||
|
||||
factory KeyTokenPreview.fromJson(Map<String, dynamic> json) {
|
||||
return KeyTokenPreview(
|
||||
keytokenID: json['keytoken_id'] as String,
|
||||
name: json['name'] as String,
|
||||
ownerUserID: json['owner_user_id'] as String,
|
||||
allChannels: json['all_channels'] as bool,
|
||||
channels: (json['channels'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
permissions: json['permissions'] as String,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -90,3 +90,20 @@ class UserWithClientsAndKeys {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class UserPreview {
|
||||
final String userID;
|
||||
final String? username;
|
||||
|
||||
const UserPreview({
|
||||
required this.userID,
|
||||
required this.username,
|
||||
});
|
||||
|
||||
factory UserPreview.fromJson(Map<String, dynamic> json) {
|
||||
return UserPreview(
|
||||
userID: json['user_id'] as String,
|
||||
username: json['username'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user