nit: fix some eventsub mini things (#5895)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user