fix(eventsub): connection race (#6017)

This commit is contained in:
pajlada
2025-03-02 16:48:08 +01:00
committed by GitHub
parent 1812f1bb15
commit 58859d439c
7 changed files with 404 additions and 156 deletions
@@ -4,20 +4,29 @@
namespace chatterino::eventsub {
QDebug &operator<<(QDebug &dbg, const SubscriptionRequest &v)
QDebug operator<<(QDebug dbg, const SubscriptionRequest &v)
{
dbg << "eventsub::SubscriptionRequest{ type:" << v.subscriptionType
<< "version:" << v.subscriptionVersion;
QDebugStateSaver saver(dbg);
dbg.nospace().noquote()
<< "eventsub::SubscriptionRequest[" << v.subscriptionType << '.'
<< v.subscriptionVersion << "]{";
bool first = true;
if (!v.conditions.empty())
{
dbg << "conditions:[";
for (const auto &[conditionKey, conditionValue] : v.conditions)
{
dbg << conditionKey << "=" << conditionValue << ',';
if (!first)
{
dbg.nospace() << ", ";
}
dbg.nospace().noquote() << conditionKey << "=" << conditionValue;
first = false;
}
dbg << ']';
}
dbg << '}';
dbg.nospace() << "} ";
return dbg;
}