Merge pull request #1733 from famedly/krille/add-commands-ignore-users

feat: Add commands /ignore and /unignore
This commit is contained in:
Mohammadreza Moradi 2024-03-15 11:01:23 +01:00 committed by GitHub
commit 8d484dbe37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -285,6 +285,22 @@ extension CommandsClientExtension on Client {
); );
return null; return null;
}); });
addCommand('ignore', (args) async {
final mxid = args.msg;
if (mxid.isEmpty) {
throw 'Please provide a User ID';
}
await ignoreUser(mxid);
return null;
});
addCommand('unignore', (args) async {
final mxid = args.msg;
if (mxid.isEmpty) {
throw 'Please provide a User ID';
}
await unignoreUser(mxid);
return null;
});
} }
} }