nit: fix some eventsub mini things (#5895)

This commit is contained in:
pajlada
2025-02-02 17:51:46 +01:00
committed by GitHub
parent 0f8a29fdb9
commit da0a247f16
10 changed files with 7 additions and 113 deletions
@@ -31,10 +31,6 @@ public:
///
/// If no open connection has room for this subscription, this function will
/// create a new connection and queue up the subscription to run again after X seconds.
///
/// TODO: Return a SubscriptionHandle that handles unsubscriptions
/// Dupe subscriptions should return shared subscription handles
/// So no more owners of the subscription handle means we send an unsubscribe request
[[nodiscard]] virtual SubscriptionHandle subscribe(
const SubscriptionRequest &request) = 0;
};
@@ -8,7 +8,7 @@ namespace chatterino::eventsub {
RawSubscriptionHandle::RawSubscriptionHandle(SubscriptionRequest request_)
: request(std::move(request_))
{
// getApp()->getEventSub()->addRef(request);
// The reference is added by the EventSub controller
}
RawSubscriptionHandle::~RawSubscriptionHandle()
@@ -14,6 +14,10 @@ struct RawSubscriptionHandle {
~RawSubscriptionHandle();
};
/// Keeps a reference count of a specific subscription
///
/// If no more references exist of a specific subscription, we send an
/// unsubscription request
using SubscriptionHandle = std::unique_ptr<RawSubscriptionHandle>;
} // namespace chatterino::eventsub