feat: Add markasdm and markasgroup commands

This makes it possible to mark a
room as dm or group. As most of
the apps using the SDK do not have
a GUI to do this, this makes it now
finally possible to repair broken DM
rooms.
This commit is contained in:
Christian Pauly 2022-08-08 08:47:07 +02:00
parent e78bf3fc09
commit 694187d5f1
1 changed files with 8 additions and 0 deletions

View File

@ -219,6 +219,14 @@ extension CommandsClientExtension on Client {
await clearCache();
return '';
});
addCommand('markasdm', (CommandArgs args) async {
await args.room.addToDirectChat(args.msg);
return;
});
addCommand('markasgroup', (CommandArgs args) async {
await args.room.removeFromDirectChat();
return;
});
}
}