feat(llc): deprecate channel.banUser in favor of channel.banMember.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-01-31 12:57:54 +05:30
committed by xsahil03x
parent 1b6051a38d
commit 15e87f76d5
@@ -1296,9 +1296,17 @@ class Channel {
}
/// Bans the user with given [userID] from the channel.
@Deprecated("Use 'banMember' instead")
Future<EmptyResponse> banUser(
String userID,
Map<String, dynamic> options,
) =>
banMember(userID, options);
/// Bans the member with given [userID] from the channel.
Future<EmptyResponse> banMember(
String userID,
Map<String, dynamic> options,
) async {
_checkInitialized();
final opts = Map<String, dynamic>.from(options)
@@ -1310,7 +1318,11 @@ class Channel {
}
/// Remove the ban for the user with given [userID] in the channel.
Future<EmptyResponse> unbanUser(String userID) async {
@Deprecated("Use 'unbanMember' instead")
Future<EmptyResponse> unbanUser(String userID) => unbanMember(userID);
/// Remove the ban for the member with given [userID] in the channel.
Future<EmptyResponse> unbanMember(String userID) async {
_checkInitialized();
return _client.unbanUser(userID, {
'type': type,