mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: skip UserInfo link if name is empty
This commit is contained in:
parent
e87302ca2d
commit
021f1a0bfc
|
@ -2773,9 +2773,14 @@ void MessageBuilder::appendTwitchBadges(const QVariantMap &tags,
|
|||
|
||||
if (sourceName.has_value())
|
||||
{
|
||||
this->emplace<BadgeElement>(makeSharedChatBadge(sourceName.value()),
|
||||
MessageElementFlag::BadgeSharedChannel)
|
||||
->setLink({Link::UserInfo, sourceName.value()});
|
||||
const auto &name = sourceName.value();
|
||||
auto *badge = this->emplace<BadgeElement>(
|
||||
makeSharedChatBadge(name),
|
||||
MessageElementFlag::BadgeSharedChannel);
|
||||
if (!name.isEmpty())
|
||||
{
|
||||
badge->setLink({Link::UserInfo, name});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue