Make various models more robust against deleted rooms

This commit is contained in:
Tobias Fella
2024-03-28 22:28:04 +01:00
parent 158942d1b5
commit e6a11b2ad8
12 changed files with 26 additions and 14 deletions

View File

@@ -80,6 +80,7 @@ QString ActionsHandler::handleMentions(QString handledText, QList<Mention> *ment
void ActionsHandler::handleMessage(const QString &text, QString handledText, ChatBarCache *chatBarCache)
{
Q_ASSERT(m_room);
if (NeoChatConfig::allowQuickEdit()) {
QRegularExpression sed(QStringLiteral("^s/([^/]*)/([^/]*)(/g)?$"));
auto match = sed.match(text);