Merge pull request #977 from Cranken/master

Made links clickable in sent whispers.
This commit is contained in:
pajlada
2019-04-14 17:15:09 +02:00
committed by GitHub
4 changed files with 66 additions and 53 deletions
+10 -2
View File
@@ -189,8 +189,16 @@ QString CommandController::execCommand(const QString &textNoEmoji,
void operator()(const QString &string,
MessageBuilder &b) const
{
b.emplace<TextElement>(
string, MessageElementFlag::Text);
auto linkString = b.matchLink(string);
if (linkString.isEmpty())
{
b.emplace<TextElement>(
string, MessageElementFlag::Text);
}
else
{
b.addLink(string, linkString);
}
}
} visitor;
boost::apply_visitor(