feat(llc): deprecate channel.banUser in favor of channel.banMember.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
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,
|
||||
|
||||
Reference in New Issue
Block a user