From 2af9284de54306145eee4042dcff6090a3b821ca Mon Sep 17 00:00:00 2001 From: Tal Neoran Date: Sun, 4 Jul 2021 19:21:18 +0300 Subject: [PATCH] Make usernames clickable in reward redemption messages (#2953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Paweł --- CHANGELOG.md | 1 + src/providers/twitch/TwitchMessageBuilder.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29b787e71..4d24e7c78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unversioned +- Minor: Username in channel points rewards redemption messages is now clickable. (#2673, #2953) - Minor: Channel name in ` has gone offline. Exiting host mode.` messages is now clickable. (#2922) - Minor: Added `/openurl` command. Usage: `/openurl `. Opens the provided URL in the browser. (#2461, #2926) - Bugfix: Now deleting cache files that weren't modified in the past 14 days. (#2947) diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index 8f1b0bf7b..766642f59 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -1269,9 +1269,11 @@ void TwitchMessageBuilder::appendChannelPointRewardMessage( QString redeemed = "Redeemed"; if (!reward.isUserInputRequired) { - builder->emplace( - reward.user.login, MessageElementFlag::ChannelPointReward, - MessageColor::Text, FontStyle::ChatMediumBold); + builder + ->emplace( + reward.user.login, MessageElementFlag::ChannelPointReward, + MessageColor::Text, FontStyle::ChatMediumBold) + ->setLink({Link::UserInfo, reward.user.login}); redeemed = "redeemed"; } builder->emplace(redeemed,