Respect follower emotes context, making them only available in their owner channels (#2951)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł
2021-07-11 11:12:49 +02:00
committed by GitHub
parent 2844c8e7e0
commit d5add46730
14 changed files with 180 additions and 28 deletions
+13 -6
View File
@@ -2,6 +2,7 @@
#include "common/NetworkRequest.hpp"
#include "messages/Link.hpp"
#include "providers/twitch/TwitchEmotes.hpp"
#include <boost/noncopyable.hpp>
@@ -35,7 +36,7 @@ struct IvrEmoteSet {
const QString setId;
const QString displayName;
const QString login;
const QString id;
const QString channelId;
const QString tier;
const QJsonArray emotes;
@@ -43,9 +44,9 @@ struct IvrEmoteSet {
: setId(root.value("setID").toString())
, displayName(root.value("channelName").toString())
, login(root.value("channelLogin").toString())
, id(root.value("channelID").toString())
, channelId(root.value("channelID").toString())
, tier(root.value("tier").toString())
, emotes(root.value("emotes").toArray())
, emotes(root.value("emoteList").toArray())
{
}
@@ -56,12 +57,18 @@ struct IvrEmote {
const QString id;
const QString setId;
const QString url;
const QString emoteType;
const QString imageType;
IvrEmote(QJsonObject root)
: code(root.value("token").toString())
explicit IvrEmote(QJsonObject root)
: code(root.value("code").toString())
, id(root.value("id").toString())
, setId(root.value("setID").toString())
, url(root.value("url_3x").toString())
, url(QString(TWITCH_EMOTE_TEMPLATE)
.replace("{id}", this->id)
.replace("{scale}", "3.0"))
, emoteType(root.value("type").toString())
, imageType(root.value("assetType").toString())
{
}
};