Corrected the way we parse comma-separated "list tags" in PRIVMSGs (#3771)

tl;dr: we now split by slash only its first occurrence instead of every occurrence.
This commit is contained in:
Kasia
2022-05-28 11:55:48 +02:00
committed by GitHub
parent 6ef3ecc952
commit 7d0023cf73
10 changed files with 228 additions and 102 deletions
+7 -3
View File
@@ -11,9 +11,13 @@ class Badge
public:
Badge(QString key, QString value);
QString key_; // e.g. bits
QString value_; // e.g. 100
QString extraValue_{}; // e.g. 5 (the number of months subscribed)
bool operator==(const Badge &other) const;
// Class members are fetched from both "badges" and "badge-info" tags
// E.g.: "badges": "subscriber/18", "badge-info": "subscriber/22"
QString key_; // subscriber
QString value_; // 18
//QString info_; // 22 (should be parsed separetly into an std::unordered_map)
MessageElementFlag flag_{
MessageElementFlag::BadgeVanity}; // badge slot it takes up
};