mirror-chatterino2/src/providers/twitch/TwitchUser.hpp

32 lines
574 B
C++
Raw Normal View History

#pragma once
#include <rapidjson/document.h>
#include <QString>
#include <cassert>
namespace chatterino {
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 chatterino