Fix Slash Commands in the Middle of a Message
Make sure that a slash command only activates when the slash is at the beginning of the message. BUG: 457474
This commit is contained in:
committed by
Tobias Fella
parent
d2ed1cfb2e
commit
53b9f42399
@@ -159,7 +159,7 @@ QVariantMap ChatDocumentHandler::getAutocompletionInfo(bool isAutocompleting)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autoCompletePrefix.startsWith("/")) {
|
if (autoCompletePrefix.startsWith("/") && text.trimmed().length() <= 1) {
|
||||||
return QVariantMap{
|
return QVariantMap{
|
||||||
{"keyword", autoCompletePrefix},
|
{"keyword", autoCompletePrefix},
|
||||||
{"type", AutoCompletionType::Command},
|
{"type", AutoCompletionType::Command},
|
||||||
|
|||||||
Reference in New Issue
Block a user