ran clang-format on all files
This commit is contained in:
@@ -140,8 +140,7 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
||||
auto chan = app->twitch.server->getChannelOrEmpty(chanName);
|
||||
|
||||
if (chan->isEmpty()) {
|
||||
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found",
|
||||
chanName);
|
||||
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found", chanName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -312,7 +311,7 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
|
||||
|
||||
if (channel->isEmpty()) {
|
||||
Log("[IrcManager:handleNoticeMessage] Channel {} not found in channel manager ",
|
||||
channelName);
|
||||
channelName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -507,8 +507,8 @@ void PubSub::unlistenAllModerationActions()
|
||||
}
|
||||
}
|
||||
|
||||
void PubSub::listenToChannelModerationActions(
|
||||
const QString &channelID, std::shared_ptr<TwitchAccount> account)
|
||||
void PubSub::listenToChannelModerationActions(const QString &channelID,
|
||||
std::shared_ptr<TwitchAccount> account)
|
||||
{
|
||||
assert(!channelID.isEmpty());
|
||||
assert(account != nullptr);
|
||||
@@ -527,8 +527,7 @@ void PubSub::listenToChannelModerationActions(
|
||||
this->listenToTopic(topic, account);
|
||||
}
|
||||
|
||||
void PubSub::listenToTopic(const std::string &topic,
|
||||
std::shared_ptr<TwitchAccount> account)
|
||||
void PubSub::listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account)
|
||||
{
|
||||
auto message = createListenMessage({topic}, account);
|
||||
|
||||
@@ -581,7 +580,7 @@ void PubSub::onMessage(websocketpp::connection_hdl hdl, WebsocketMessagePtr webs
|
||||
|
||||
if (!res) {
|
||||
Log("Error parsing message '{}' from PubSub: {}", payload,
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -713,7 +712,7 @@ void PubSub::handleMessageResponse(const rapidjson::Value &outerData)
|
||||
|
||||
if (!res) {
|
||||
Log("Error parsing message '{}' from PubSub: {}", payload,
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
rapidjson::GetParseError_En(res.Code()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,14 +121,13 @@ public:
|
||||
|
||||
void unlistenAllModerationActions();
|
||||
|
||||
void listenToChannelModerationActions(
|
||||
const QString &channelID, std::shared_ptr<TwitchAccount> account);
|
||||
void listenToChannelModerationActions(const QString &channelID,
|
||||
std::shared_ptr<TwitchAccount> account);
|
||||
|
||||
std::vector<std::unique_ptr<rapidjson::Document>> requests;
|
||||
|
||||
private:
|
||||
void listenToTopic(const std::string &topic,
|
||||
std::shared_ptr<TwitchAccount> account);
|
||||
void listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account);
|
||||
|
||||
void listen(rapidjson::Document &&msg);
|
||||
bool tryListen(rapidjson::Document &msg);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "providers/twitch/TwitchAccountManager.hpp"
|
||||
|
||||
#include "common/Common.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -123,11 +123,10 @@ void TwitchAccountManager::load()
|
||||
auto user = this->findUserByUsername(newUsername);
|
||||
if (user) {
|
||||
Log("[AccountManager:currentUsernameChanged] User successfully updated to {}",
|
||||
newUsername);
|
||||
newUsername);
|
||||
this->currentUser = user;
|
||||
} else {
|
||||
Log(
|
||||
"[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
|
||||
Log("[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
|
||||
this->currentUser = this->anonymousUser;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
|
||||
#include "common/Common.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "providers/twitch/Pubsub.hpp"
|
||||
@@ -9,7 +10,6 @@
|
||||
#include "singletons/IrcManager.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
|
||||
#include <IrcConnection>
|
||||
#include <QThread>
|
||||
@@ -84,7 +84,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
||||
}
|
||||
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
|
||||
QThread::currentThread(), refreshChatters);
|
||||
QThread::currentThread(), refreshChatters);
|
||||
};
|
||||
|
||||
doRefreshChatters();
|
||||
@@ -145,7 +145,7 @@ void TwitchChannel::sendMessage(const QString &message)
|
||||
// manager" dialog
|
||||
this->addMessage(
|
||||
chatterino::Message::createSystemMessage("You need to log in to send messages. You can "
|
||||
"link your Twitch account in the settings."));
|
||||
"link your Twitch account in the settings."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ void TwitchChannel::addJoinedUser(const QString &user)
|
||||
std::lock_guard<std::mutex> guard(this->joinedUserMutex);
|
||||
|
||||
auto message = chatterino::Message::createSystemMessage("Users joined: " +
|
||||
this->joinedUsers.join(", "));
|
||||
this->joinedUsers.join(", "));
|
||||
message->flags |= chatterino::Message::Collapsed;
|
||||
this->addMessage(message);
|
||||
this->joinedUsers.clear();
|
||||
@@ -263,7 +263,7 @@ void TwitchChannel::addPartedUser(const QString &user)
|
||||
std::lock_guard<std::mutex> guard(this->partedUserMutex);
|
||||
|
||||
auto message = chatterino::Message::createSystemMessage("Users parted: " +
|
||||
this->partedUsers.join(", "));
|
||||
this->partedUsers.join(", "));
|
||||
message->flags |= chatterino::Message::Collapsed;
|
||||
this->addMessage(message);
|
||||
this->partedUsers.clear();
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#include "common/Channel.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/MutexValue.hpp"
|
||||
#include "singletons/EmoteManager.hpp"
|
||||
#include "singletons/IrcManager.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/MutexValue.hpp"
|
||||
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/Emotemap.hpp"
|
||||
#include "providers/twitch/EmoteValue.hpp"
|
||||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
#include "providers/twitch/TwitchEmotes.hpp"
|
||||
#include "util/ConcurrentMap.hpp"
|
||||
#include "common/Emotemap.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ void TwitchServer::initialize()
|
||||
[this]() { postToThread([this] { this->connect(); }); });
|
||||
}
|
||||
|
||||
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
|
||||
bool isWrite)
|
||||
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite)
|
||||
{
|
||||
std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user