mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Use login name for NotificationController lookup (#3648)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
81a62764c8
commit
870aa74427
3 changed files with 10 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
|
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
|
||||||
|
|
||||||
## 2.3.5
|
## 2.3.5
|
||||||
|
|
||||||
- Major: Added highlights for first messages (#3267)
|
- Major: Added highlights for first messages (#3267)
|
||||||
|
|
|
@ -178,12 +178,12 @@ void NotificationController::fetchFakeChannels()
|
||||||
std::unordered_set<QString> liveStreams;
|
std::unordered_set<QString> liveStreams;
|
||||||
for (const auto &stream : streams)
|
for (const auto &stream : streams)
|
||||||
{
|
{
|
||||||
liveStreams.insert(stream.userName);
|
liveStreams.insert(stream.userLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &name : batch)
|
for (const auto &name : batch)
|
||||||
{
|
{
|
||||||
auto it = liveStreams.find(name);
|
auto it = liveStreams.find(name.toLower());
|
||||||
this->checkStream(it != liveStreams.end(), name);
|
this->checkStream(it != liveStreams.end(), name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -86,8 +86,10 @@ struct HelixUsersFollowsResponse {
|
||||||
struct HelixStream {
|
struct HelixStream {
|
||||||
QString id; // stream id
|
QString id; // stream id
|
||||||
QString userId;
|
QString userId;
|
||||||
|
QString userLogin;
|
||||||
QString userName;
|
QString userName;
|
||||||
QString gameId;
|
QString gameId;
|
||||||
|
QString gameName;
|
||||||
QString type;
|
QString type;
|
||||||
QString title;
|
QString title;
|
||||||
int viewerCount;
|
int viewerCount;
|
||||||
|
@ -98,8 +100,10 @@ struct HelixStream {
|
||||||
HelixStream()
|
HelixStream()
|
||||||
: id("")
|
: id("")
|
||||||
, userId("")
|
, userId("")
|
||||||
|
, userLogin("")
|
||||||
, userName("")
|
, userName("")
|
||||||
, gameId("")
|
, gameId("")
|
||||||
|
, gameName("")
|
||||||
, type("")
|
, type("")
|
||||||
, title("")
|
, title("")
|
||||||
, viewerCount()
|
, viewerCount()
|
||||||
|
@ -112,8 +116,10 @@ struct HelixStream {
|
||||||
explicit HelixStream(QJsonObject jsonObject)
|
explicit HelixStream(QJsonObject jsonObject)
|
||||||
: id(jsonObject.value("id").toString())
|
: id(jsonObject.value("id").toString())
|
||||||
, userId(jsonObject.value("user_id").toString())
|
, userId(jsonObject.value("user_id").toString())
|
||||||
|
, userLogin(jsonObject.value("user_login").toString())
|
||||||
, userName(jsonObject.value("user_name").toString())
|
, userName(jsonObject.value("user_name").toString())
|
||||||
, gameId(jsonObject.value("game_id").toString())
|
, gameId(jsonObject.value("game_id").toString())
|
||||||
|
, gameName(jsonObject.value("game_name").toString())
|
||||||
, type(jsonObject.value("type").toString())
|
, type(jsonObject.value("type").toString())
|
||||||
, title(jsonObject.value("title").toString())
|
, title(jsonObject.value("title").toString())
|
||||||
, viewerCount(jsonObject.value("viewer_count").toInt())
|
, viewerCount(jsonObject.value("viewer_count").toInt())
|
||||||
|
|
Loading…
Reference in a new issue