Add debug output to channel point reward callbacks (#4142)

This commit is contained in:
pajlada 2022-11-12 00:49:44 +01:00 committed by GitHub
parent 46cdb89498
commit c714f15ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -454,8 +454,14 @@ void IrcMessageHandler::addMessage(Communi::IrcMessage *_message,
{ {
// Need to wait for pubsub reward notification // Need to wait for pubsub reward notification
auto clone = _message->clone(); auto clone = _message->clone();
qCDebug(chatterinoTwitch) << "TwitchChannel reward added ADD "
"callback since reward is not known:"
<< rewardId;
channel->channelPointRewardAdded.connect( channel->channelPointRewardAdded.connect(
[=, &server](ChannelPointReward reward) { [=, &server](ChannelPointReward reward) {
qCDebug(chatterinoTwitch)
<< "TwitchChannel reward added callback:" << reward.id
<< "-" << rewardId;
if (reward.id == rewardId) if (reward.id == rewardId)
{ {
this->addMessage(clone, target, content_, server, isSub, this->addMessage(clone, target, content_, server, isSub,

View file

@ -267,6 +267,10 @@ void TwitchChannel::addChannelPointReward(const ChannelPointReward &reward)
} }
if (result) if (result)
{ {
qCDebug(chatterinoTwitch)
<< "[TwitchChannel" << this->getName()
<< "] Channel point reward added:" << reward.id << ","
<< reward.title << "," << reward.isUserInputRequired;
this->channelPointRewardAdded.invoke(reward); this->channelPointRewardAdded.invoke(reward);
} }
} }