mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: skip UserInfo link if name is empty
This commit is contained in:
parent
e87302ca2d
commit
021f1a0bfc
1 changed files with 8 additions and 3 deletions
|
@ -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