Merge pull request #3496 from matrix-org/bwindels/fix-ac-bis

Fix: even more resilience to detect slash commands
pull/21833/head
David Baker 2019-10-01 11:52:36 +01:00 committed by GitHub
commit d369e1ff5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ export default class SendMessageComposer extends React.Component {
// be extra resilient when somehow the AutocompleteWrapperModel or
// CommandPartCreator fails to insert a command part, so we don't send
// a command as a message
if (firstPart.type === "plain" && firstPart.text.startsWith("/")) {
if (firstPart.text.startsWith("/") && (firstPart.type === "plain" || firstPart.type === "pill-candidate")) {
return true;
}
}