mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: unlisten to automod on user change (#3718)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
07dd8c560b
commit
94f067ce62
|
@ -20,6 +20,7 @@
|
||||||
- Bugfix: Fixed an issue in the emote picker where an emotes tooltip would not properly disappear. (#3686)
|
- Bugfix: Fixed an issue in the emote picker where an emotes tooltip would not properly disappear. (#3686)
|
||||||
- Bugfix: Fixed incorrect spacing of settings icons at high DPI. (#3698)
|
- Bugfix: Fixed incorrect spacing of settings icons at high DPI. (#3698)
|
||||||
- Bugfix: Fixed existing emote popups not being raised from behind other windows when refocusing them on macOS (#3713)
|
- Bugfix: Fixed existing emote popups not being raised from behind other windows when refocusing them on macOS (#3713)
|
||||||
|
- Bugfix: Fixed automod queue pubsub topic persisting after user change. (#3718)
|
||||||
- Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662)
|
- Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662)
|
||||||
|
|
||||||
## 2.3.5
|
## 2.3.5
|
||||||
|
|
|
@ -507,6 +507,7 @@ void Application::initPubSub()
|
||||||
this->accounts->twitch.currentUserChanged.connect(
|
this->accounts->twitch.currentUserChanged.connect(
|
||||||
[=] {
|
[=] {
|
||||||
this->twitch->pubsub->unlistenAllModerationActions();
|
this->twitch->pubsub->unlistenAllModerationActions();
|
||||||
|
this->twitch->pubsub->unlistenAutomod();
|
||||||
this->twitch->pubsub->unlistenWhispers();
|
this->twitch->pubsub->unlistenWhispers();
|
||||||
},
|
},
|
||||||
boost::signals2::at_front);
|
boost::signals2::at_front);
|
||||||
|
|
|
@ -547,6 +547,25 @@ void PubSub::unlistenAllModerationActions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PubSub::unlistenAutomod()
|
||||||
|
{
|
||||||
|
for (const auto &p : this->clients)
|
||||||
|
{
|
||||||
|
const auto &client = p.second;
|
||||||
|
if (const auto &[topics, nonce] =
|
||||||
|
client->unlistenPrefix("automod-queue.");
|
||||||
|
!topics.empty())
|
||||||
|
{
|
||||||
|
this->registerNonce(nonce, {
|
||||||
|
client,
|
||||||
|
"UNLISTEN",
|
||||||
|
topics,
|
||||||
|
topics.size(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PubSub::unlistenWhispers()
|
void PubSub::unlistenWhispers()
|
||||||
{
|
{
|
||||||
for (const auto &p : this->clients)
|
for (const auto &p : this->clients)
|
||||||
|
|
|
@ -119,6 +119,7 @@ public:
|
||||||
} signals_;
|
} signals_;
|
||||||
|
|
||||||
void unlistenAllModerationActions();
|
void unlistenAllModerationActions();
|
||||||
|
void unlistenAutomod();
|
||||||
void unlistenWhispers();
|
void unlistenWhispers();
|
||||||
|
|
||||||
bool listenToWhispers();
|
bool listenToWhispers();
|
||||||
|
|
Loading…
Reference in a new issue