mirror-chatterino2/src/providers/twitch/twitchuser.hpp
Rasmus Karlsson bf0b5d08d8 Implement /ignore and /unignore commands
Simplify authorized network requests for Twitch V5 api
add onShow virtual function to settings pages if they need to be refreshed when shown
Actually ignoring messages from ignored users is still not implemented

Working on #247
2018-05-12 20:34:13 +02:00

36 lines
664 B
C++

#pragma once
#include <rapidjson/document.h>
#include <QString>
#include <cassert>
namespace chatterino {
namespace providers {
namespace twitch {
struct TwitchUser {
QString id;
mutable QString name;
mutable QString displayName;
void update(const TwitchUser &other) const
{
assert(this->id == other.id);
this->name = other.name;
this->displayName = other.displayName;
}
static TwitchUser fromJSON(const rapidjson::Value &value);
bool operator<(const TwitchUser &rhs) const
{
return this->id < rhs.id;
}
};
} // namespace twitch
} // namespace providers
} // namespace chatterino