Fix bug regarding mentions with comma

While tab-completing user names already respected the setting for
mentions with commas, right-clicking user names did not.

This commit adds the missing check in ChannelView::handleMouseClick.
This commit is contained in:
Leon Richardt 2019-10-03 15:30:51 +02:00
parent 375aa221eb
commit d6bcd61289
No known key found for this signature in database
GPG key ID: AD8BDD6273FE8FC5

View file

@ -1506,7 +1506,8 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
auto &link = hoveredElement->getLink();
if (link.type == Link::UserInfo)
{
insertText("@" + link.value + ", ");
const bool commaMention = getSettings()->mentionUsersWithComma;
insertText("@" + link.value + (commaMention ? ", " : " "));
}
else if (link.type == Link::UserWhisper)
{