feat(spellcheck): ignore links for spellchecking (#6722)

Reviewed-by: pajlada <rasmus.karlsson+github@pajlada.com>
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
2547techno
2026-01-08 16:32:37 -05:00
committed by GitHub
parent 9c4ba73af9
commit 4a56970101
2 changed files with 14 additions and 6 deletions
+13 -5
View File
@@ -6,6 +6,7 @@
#include "Application.hpp"
#include "common/Aliases.hpp"
#include "common/LinkParser.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/spellcheck/SpellChecker.hpp"
#include "messages/Emote.hpp"
@@ -49,11 +50,18 @@ bool isIgnoredWord(TwitchChannel *twitch, const QString &word)
return true;
}
return getApp()
->getAccounts()
->twitch.getCurrent()
->twitchEmote(name)
.has_value();
if (getApp()
->getAccounts()
->twitch.getCurrent()
->twitchEmote(name)
.has_value())
{
return true;
}
// TODO: Replace this with a link parser variant that doesn't return the parsed data
auto link = linkparser::parse(word);
return link.has_value();
}
} // namespace