2018-06-26 14:09:39 +02:00
|
|
|
#include "providers/twitch/TwitchUser.hpp"
|
2018-05-12 20:34:13 +02:00
|
|
|
|
2024-09-01 11:22:54 +02:00
|
|
|
#include "debug/AssertInGuiThread.hpp"
|
2022-12-31 15:41:01 +01:00
|
|
|
#include "providers/twitch/api/Helix.hpp"
|
2018-05-12 20:34:13 +02:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2022-12-31 15:41:01 +01:00
|
|
|
void TwitchUser::fromHelixBlock(const HelixBlock &ignore)
|
|
|
|
{
|
|
|
|
this->id = ignore.userId;
|
|
|
|
this->name = ignore.userName;
|
|
|
|
this->displayName = ignore.displayName;
|
|
|
|
}
|
|
|
|
|
2024-09-01 11:22:54 +02:00
|
|
|
void TwitchUser::update(const HelixUser &user) const
|
|
|
|
{
|
|
|
|
assertInGuiThread();
|
|
|
|
assert(this->id == user.id);
|
|
|
|
this->name = user.login;
|
|
|
|
this->displayName = user.displayName;
|
|
|
|
}
|
|
|
|
|
2018-05-12 20:34:13 +02:00
|
|
|
} // namespace chatterino
|