Use login name for NotificationController lookup (#3648)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
## Unversioned
|
||||
|
||||
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
|
||||
|
||||
## 2.3.5
|
||||
|
||||
- Major: Added highlights for first messages (#3267)
|
||||
|
||||
@@ -178,12 +178,12 @@ void NotificationController::fetchFakeChannels()
|
||||
std::unordered_set<QString> liveStreams;
|
||||
for (const auto &stream : streams)
|
||||
{
|
||||
liveStreams.insert(stream.userName);
|
||||
liveStreams.insert(stream.userLogin);
|
||||
}
|
||||
|
||||
for (const auto &name : batch)
|
||||
{
|
||||
auto it = liveStreams.find(name);
|
||||
auto it = liveStreams.find(name.toLower());
|
||||
this->checkStream(it != liveStreams.end(), name);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -86,8 +86,10 @@ struct HelixUsersFollowsResponse {
|
||||
struct HelixStream {
|
||||
QString id; // stream id
|
||||
QString userId;
|
||||
QString userLogin;
|
||||
QString userName;
|
||||
QString gameId;
|
||||
QString gameName;
|
||||
QString type;
|
||||
QString title;
|
||||
int viewerCount;
|
||||
@@ -98,8 +100,10 @@ struct HelixStream {
|
||||
HelixStream()
|
||||
: id("")
|
||||
, userId("")
|
||||
, userLogin("")
|
||||
, userName("")
|
||||
, gameId("")
|
||||
, gameName("")
|
||||
, type("")
|
||||
, title("")
|
||||
, viewerCount()
|
||||
@@ -112,8 +116,10 @@ struct HelixStream {
|
||||
explicit HelixStream(QJsonObject jsonObject)
|
||||
: id(jsonObject.value("id").toString())
|
||||
, userId(jsonObject.value("user_id").toString())
|
||||
, userLogin(jsonObject.value("user_login").toString())
|
||||
, userName(jsonObject.value("user_name").toString())
|
||||
, gameId(jsonObject.value("game_id").toString())
|
||||
, gameName(jsonObject.value("game_name").toString())
|
||||
, type(jsonObject.value("type").toString())
|
||||
, title(jsonObject.value("title").toString())
|
||||
, viewerCount(jsonObject.value("viewer_count").toInt())
|
||||
|
||||
Reference in New Issue
Block a user