diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2023-03-25 20:02:50 -0400 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2023-04-08 18:59:17 -0400 |
commit | b95388a5b9a546be4725d846ec62d120166cb357 (patch) | |
tree | 9bda4bddd28ce08c1141da090e71191ae774d6ec /src | |
parent | Fix command name (diff) | |
download | nheko-b95388a5b9a546be4725d846ec62d120166cb357.tar.xz |
Don't allow rainbowifying custom messages
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/InputBar.cpp | 6 | ||||
-rw-r--r-- | src/timeline/InputBar.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 0fa5cff4..3a14790c 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -651,9 +651,9 @@ InputBar::rainfall(const QString &body, bool rainbowify) } void -InputBar::customMsgtype(const QString &msgtype, const QString &body, bool rainbowify) +InputBar::customMsgtype(const QString &msgtype, const QString &body) { - auto html = utils::markdownToHtml(body, rainbowify); + auto html = utils::markdownToHtml(body); mtx::events::msg::Unknown msg; msg.msgtype = msgtype.toStdString(); @@ -946,7 +946,7 @@ InputBar::command(const QString &command, QString args) } else if (command == QLatin1String("rainbowrain")) { rainfall(args, true); } else if (command == QLatin1String("msgtype")) { - customMsgtype(args.section(' ', 0, 0), args.section(' ', 1, -1), false); + customMsgtype(args.section(' ', 0, 0), args.section(' ', 1, -1)); } else if (command == QLatin1String("goto")) { // Goto has three different modes: // 1 - Going directly to a given event ID diff --git a/src/timeline/InputBar.h b/src/timeline/InputBar.h index 61ba9f12..4d836375 100644 --- a/src/timeline/InputBar.h +++ b/src/timeline/InputBar.h @@ -243,7 +243,7 @@ private: void notice(const QString &body, bool rainbowify); void confetti(const QString &body, bool rainbowify); void rainfall(const QString &body, bool rainbowify); - void customMsgtype(const QString &msgtype, const QString &body, bool rainbowify); + void customMsgtype(const QString &msgtype, const QString &body); bool command(const QString &name, QString args); void image(const QString &filename, const std::optional<mtx::crypto::EncryptedFile> &file, |