diff --git a/src/messages/MessageBuilder.cpp b/src/messages/MessageBuilder.cpp index efc885a49..35b360b00 100644 --- a/src/messages/MessageBuilder.cpp +++ b/src/messages/MessageBuilder.cpp @@ -2759,7 +2759,7 @@ void MessageBuilder::appendTwitchBadges(const QVariantMap &tags, if (this->message().flags.has(MessageFlag::SharedMessage)) { - QString sourceId = tags["source-room-id"].toString(); + const QString sourceId = tags["source-room-id"].toString(); std::optional sourceName; if (twitchChannel->roomId() == sourceId) { diff --git a/src/providers/twitch/TwitchIrcServer.hpp b/src/providers/twitch/TwitchIrcServer.hpp index 532e0afe2..a590a41f8 100644 --- a/src/providers/twitch/TwitchIrcServer.hpp +++ b/src/providers/twitch/TwitchIrcServer.hpp @@ -100,6 +100,11 @@ public: std::shared_ptr getChannelOrEmptyByID( const QString &channelID) override; + /** + * Obtains the channel login name associated with the passed ID, + * so that Shared Chat messages can provide source channel context. + * Can yield an empty string if a helix request is already in-flight. + */ std::optional getOrPopulateChannelCache( const QString &channelId) override;