mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Don't allow rainbowifying custom messages
This commit is contained in:
parent
0c1cd7a359
commit
b95388a5b9
2 changed files with 4 additions and 4 deletions
|
@ -651,9 +651,9 @@ InputBar::rainfall(const QString &body, bool rainbowify)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
mtx::events::msg::Unknown msg;
|
||||||
msg.msgtype = msgtype.toStdString();
|
msg.msgtype = msgtype.toStdString();
|
||||||
|
@ -946,7 +946,7 @@ InputBar::command(const QString &command, QString args)
|
||||||
} else if (command == QLatin1String("rainbowrain")) {
|
} else if (command == QLatin1String("rainbowrain")) {
|
||||||
rainfall(args, true);
|
rainfall(args, true);
|
||||||
} else if (command == QLatin1String("msgtype")) {
|
} 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")) {
|
} else if (command == QLatin1String("goto")) {
|
||||||
// Goto has three different modes:
|
// Goto has three different modes:
|
||||||
// 1 - Going directly to a given event ID
|
// 1 - Going directly to a given event ID
|
||||||
|
|
|
@ -243,7 +243,7 @@ private:
|
||||||
void notice(const QString &body, bool rainbowify);
|
void notice(const QString &body, bool rainbowify);
|
||||||
void confetti(const QString &body, bool rainbowify);
|
void confetti(const QString &body, bool rainbowify);
|
||||||
void rainfall(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);
|
bool command(const QString &name, QString args);
|
||||||
void image(const QString &filename,
|
void image(const QString &filename,
|
||||||
const std::optional<mtx::crypto::EncryptedFile> &file,
|
const std::optional<mtx::crypto::EncryptedFile> &file,
|
||||||
|
|
Loading…
Reference in a new issue