From 8178366038b9978c4ac44db4053573c3f0861a9a Mon Sep 17 00:00:00 2001 From: Ash Keel Date: Fri, 31 Mar 2023 10:26:40 +0200 Subject: [PATCH] fix: assign initial loyalty points values correctly --- CHANGELOG.md | 5 +++++ loyalty/manager.go | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60bee14..448ffcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [current] +### Fixed + +- The "Give points" dialog will now convert mixed case names to be lowercase instead of adding broken entries. +- The loyalty points entry were assigned incorrectly upon startup, this has been fixed + ## [3.1.3] - 2023-03-14 ### Changed diff --git a/loyalty/manager.go b/loyalty/manager.go index d7e74f0..ec4bc22 100644 --- a/loyalty/manager.go +++ b/loyalty/manager.go @@ -114,7 +114,8 @@ func NewManager(db *database.LocalDBClient, twitchManager *twitch.Manager, logge if err != nil { return nil, err } - loyalty.points.SetKey(k, entry) + + loyalty.points.SetKey(k[len(PointsPrefix):], entry) } // SubscribePrefix for changes