mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
23 lines
535 B
C++
23 lines
535 B
C++
#include "providers/twitch/TwitchUser.hpp"
|
|
|
|
#include "debug/AssertInGuiThread.hpp"
|
|
#include "providers/twitch/api/Helix.hpp"
|
|
|
|
namespace chatterino {
|
|
|
|
void TwitchUser::fromHelixBlock(const HelixBlock &ignore)
|
|
{
|
|
this->id = ignore.userId;
|
|
this->name = ignore.userName;
|
|
this->displayName = ignore.displayName;
|
|
}
|
|
|
|
void TwitchUser::update(const HelixUser &user) const
|
|
{
|
|
assertInGuiThread();
|
|
assert(this->id == user.id);
|
|
this->name = user.login;
|
|
this->displayName = user.displayName;
|
|
}
|
|
|
|
} // namespace chatterino
|