build: Matrix version 3.0.0
This commit is contained in:
parent
d48ff5b9a3
commit
f634e67d69
3 changed files with 7 additions and 24 deletions
|
|
@ -46,22 +46,7 @@ class SettingsIgnoreListController extends State<SettingsIgnoreList> {
|
|||
final client = Matrix.of(context).client;
|
||||
showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () async {
|
||||
for (final room in client.rooms) {
|
||||
final isInviteFromUser = room.membership == Membership.invite &&
|
||||
room.getState(EventTypes.RoomMember, client.userID!)?.senderId ==
|
||||
userId;
|
||||
|
||||
if (room.directChatMatrixID == userId || isInviteFromUser) {
|
||||
try {
|
||||
await room.leave();
|
||||
} catch (e, s) {
|
||||
Logs().w('Unable to leave room with blocked user $userId', e, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
await client.ignoreUser(userId);
|
||||
},
|
||||
future: () => client.ignoreUser(userId),
|
||||
);
|
||||
setState(() {});
|
||||
controller.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue