Add a /command to redact all visible messages sent by a user
This commit is contained in:
parent
7198cee85e
commit
678806749d
4 changed files with 31 additions and 0 deletions
|
|
@ -692,6 +692,12 @@ InputBar::command(const QString &command, QString args)
|
|||
} else if (command == QLatin1String("unban")) {
|
||||
ChatPage::instance()->unbanUser(
|
||||
room->roomId(), args.section(' ', 0, 0), args.section(' ', 1, -1));
|
||||
} else if (command == QLatin1String("redact")) {
|
||||
if (args.startsWith('@')) {
|
||||
room->redactAllFromUser(args.section(' ', 0, 0), args.section(' ', 1, -1));
|
||||
} else if (args.startsWith('$')) {
|
||||
room->redactEvent(args.section(' ', 0, 0), args.section(' ', 1, -1));
|
||||
}
|
||||
} else if (command == QLatin1String("roomnick")) {
|
||||
mtx::events::state::Member member;
|
||||
member.display_name = args.toStdString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue