fix: Unban
This commit is contained in:
parent
411d29cc89
commit
ab8eb71fee
|
|
@ -1023,8 +1023,8 @@ class MatrixApi {
|
|||
/// would otherwise be allowed to join according to its join rules.
|
||||
/// https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-unban
|
||||
Future<void> unbanInRoom(String roomId, String userId) async {
|
||||
await request(
|
||||
RequestType.POST, '/client/r0/rooms/${Uri.encodeComponent(roomId)}/ban',
|
||||
await request(RequestType.POST,
|
||||
'/client/r0/rooms/${Uri.encodeComponent(roomId)}/unban',
|
||||
data: {
|
||||
'user_id': userId,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -163,10 +163,7 @@ class User extends Event {
|
|||
Presence get presence => room.client.presences[id];
|
||||
|
||||
/// Whether the client is able to ban/unban this user.
|
||||
bool get canBan =>
|
||||
membership != Membership.ban &&
|
||||
room.canBan &&
|
||||
powerLevel < room.ownPowerLevel;
|
||||
bool get canBan => room.canBan && powerLevel < room.ownPowerLevel;
|
||||
|
||||
/// Whether the client is able to kick this user.
|
||||
bool get canKick =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue