diff --git a/man/nheko.1.adoc b/man/nheko.1.adoc index ef8f27284..e1ce8e0f7 100644 --- a/man/nheko.1.adoc +++ b/man/nheko.1.adoc @@ -210,7 +210,7 @@ Redacts all visible messages of the specified user. You will run into rate limit */redact* __ _[reason]_:: Redacts a specific event. -*/roomnick* __:: +*/myroomnick*, */roomnick* __:: Change your nickname in a single room. === Emoticons diff --git a/src/CommandCompleter.cpp b/src/CommandCompleter.cpp index 51eef4f56..de837f15a 100644 --- a/src/CommandCompleter.cpp +++ b/src/CommandCompleter.cpp @@ -55,6 +55,8 @@ CommandCompleter::data(const QModelIndex &index, int role) const return QString("/unban @"); case Redact: return QString("/redact "); + case MyRoomnick: + return QString("/myroomnick "); case Roomnick: return QString("/roomnick "); case Shrug: diff --git a/src/CommandCompleter.h b/src/CommandCompleter.h index a3339c7a9..cf9038cc5 100644 --- a/src/CommandCompleter.h +++ b/src/CommandCompleter.h @@ -31,6 +31,7 @@ class CommandCompleter final : public QAbstractListModel Ban, Unban, Redact, + MyRoomnick, Roomnick, Shrug, Fliptable, diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 949443372..c1e9f53bb 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -776,7 +776,7 @@ InputBar::command(const QString &command, QString args) } else if (args.startsWith('$')) { room->redactEvent(args.section(' ', 0, 0), args.section(' ', 1, -1)); } - } else if (command == QLatin1String("roomnick")) { + } else if (command == QLatin1String("myroomnick") || command == QLatin1String("roomnick")) { mtx::events::state::Member member; member.display_name = args.toStdString(); member.avatar_url =