global badge/class fix

This commit is contained in:
Luxferre
2024-09-20 13:44:13 +03:00
parent b6200db5de
commit 9f298cba52
6 changed files with 18 additions and 21 deletions
+2 -2
View File
@@ -119,14 +119,14 @@ func kk_process_message(rawmsg map[string]interface{}) {
/* process username color preference */
if _, ok := metadata["color"]; ok && len(metadata["color"].(string)) > 0 {
out_message.Type += "-color" + metadata["color"].(string)
out_message.Type += "^color" + metadata["color"].(string)
}
/* process username badges */
if _, ok := metadata["badges"]; ok && len(metadata["badges"].([]interface{})) > 0 {
for _, badge := range metadata["badges"].([]interface{}) {
if badge.(map[string]interface{})["active"].(bool) {
out_message.Type += "-" + strings.ToLower(badge.(map[string]interface{})["text"].(string))
out_message.Type += "^" + strings.ToLower(badge.(map[string]interface{})["text"].(string))
}
}
}