renamed Twitch to twitch
This commit is contained in:
@@ -44,7 +44,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
||||
this->refreshLiveStatus(); //
|
||||
});
|
||||
|
||||
this->managedConnect(app->accounts->Twitch.currentUserChanged,
|
||||
this->managedConnect(app->accounts->twitch.currentUserChanged,
|
||||
[this]() { this->setMod(false); });
|
||||
|
||||
auto refreshPubSubState = [=]() {
|
||||
@@ -56,7 +56,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
||||
return;
|
||||
}
|
||||
|
||||
auto account = app->accounts->Twitch.getCurrent();
|
||||
auto account = app->accounts->twitch.getCurrent();
|
||||
if (account && !account->getUserId().isEmpty()) {
|
||||
app->twitch.pubsub->listenToChannelModerationActions(this->roomID, account);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
||||
|
||||
this->userStateChanged.connect(refreshPubSubState);
|
||||
this->roomIDchanged.connect(refreshPubSubState);
|
||||
this->managedConnect(app->accounts->Twitch.currentUserChanged, refreshPubSubState);
|
||||
this->managedConnect(app->accounts->twitch.currentUserChanged, refreshPubSubState);
|
||||
refreshPubSubState();
|
||||
|
||||
this->fetchMessages.connect([this] {
|
||||
@@ -190,9 +190,9 @@ bool TwitchChannel::isBroadcaster()
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
qDebug() << "ASD" << (this->name == app->accounts->Twitch.getCurrent()->getUserName());
|
||||
qDebug() << "ASD" << (this->name == app->accounts->twitch.getCurrent()->getUserName());
|
||||
|
||||
return this->name == app->accounts->Twitch.getCurrent()->getUserName();
|
||||
return this->name == app->accounts->twitch.getCurrent()->getUserName();
|
||||
}
|
||||
|
||||
bool TwitchChannel::hasModRights()
|
||||
@@ -215,7 +215,7 @@ void TwitchChannel::addRecentChatter(const std::shared_ptr<messages::Message> &m
|
||||
void TwitchChannel::addJoinedUser(const QString &user)
|
||||
{
|
||||
auto *app = getApp();
|
||||
if (user == app->accounts->Twitch.getCurrent()->getUserName() ||
|
||||
if (user == app->accounts->twitch.getCurrent()->getUserName() ||
|
||||
!app->settings->showJoins.getValue()) {
|
||||
return;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ void TwitchChannel::addPartedUser(const QString &user)
|
||||
{
|
||||
auto *app = getApp();
|
||||
|
||||
if (user == app->accounts->Twitch.getCurrent()->getUserName() ||
|
||||
if (user == app->accounts->twitch.getCurrent()->getUserName() ||
|
||||
!app->settings->showJoins.getValue()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ bool TwitchMessageBuilder::isIgnored() const
|
||||
if (app->settings->enableTwitchIgnoredUsers && this->tags.contains("user-id")) {
|
||||
auto sourceUserID = this->tags.value("user-id").toString();
|
||||
|
||||
for (const auto &user : app->accounts->Twitch.getCurrent()->getIgnores()) {
|
||||
for (const auto &user : app->accounts->twitch.getCurrent()->getIgnores()) {
|
||||
if (sourceUserID == user.id) {
|
||||
debug::Log("Blocking message because it's from blocked user {}", user.name);
|
||||
return true;
|
||||
@@ -79,7 +79,7 @@ bool TwitchMessageBuilder::isIgnored() const
|
||||
if (app->settings->enableTwitchIgnoredUsers && this->tags.contains("user-id")) {
|
||||
auto sourceUserID = this->tags.value("user-id").toString();
|
||||
|
||||
for (const auto &user : app->accounts->Twitch.getCurrent()->getIgnores()) {
|
||||
for (const auto &user : app->accounts->twitch.getCurrent()->getIgnores()) {
|
||||
if (sourceUserID == user.id) {
|
||||
debug::Log("Blocking message because it's from blocked user {}", user.name);
|
||||
return true;
|
||||
@@ -359,7 +359,7 @@ void TwitchMessageBuilder::appendUsername()
|
||||
FontStyle::ChatMediumBold)
|
||||
->setLink({Link::UserInfo, this->userName});
|
||||
|
||||
auto currentUser = app->accounts->Twitch.getCurrent();
|
||||
auto currentUser = app->accounts->twitch.getCurrent();
|
||||
|
||||
// Separator
|
||||
this->emplace<TextElement>("->", MessageElement::Text,
|
||||
@@ -391,7 +391,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
|
||||
auto app = getApp();
|
||||
|
||||
auto currentUser = app->accounts->Twitch.getCurrent();
|
||||
auto currentUser = app->accounts->twitch.getCurrent();
|
||||
|
||||
QString currentUsername = currentUser->getUserName();
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ TwitchServer::TwitchServer()
|
||||
|
||||
void TwitchServer::initialize()
|
||||
{
|
||||
getApp()->accounts->Twitch.currentUserChanged.connect(
|
||||
getApp()->accounts->twitch.currentUserChanged.connect(
|
||||
[this]() { util::postToThread([this] { this->connect(); }); });
|
||||
}
|
||||
|
||||
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite)
|
||||
{
|
||||
std::shared_ptr<TwitchAccount> account = getApp()->accounts->Twitch.getCurrent();
|
||||
std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent();
|
||||
|
||||
qDebug() << "logging in as" << account->getUserName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user