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

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-02-01 10:29:11 +01:00
committed by Salvatore Giordano
parent 99af4ab8e2
commit e1bdb07128
@@ -1318,9 +1318,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)
@@ -1332,7 +1340,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,