global badge/class fix
This commit is contained in:
+3
-4
@@ -74,7 +74,6 @@ func oc_process_message(rawmsg map[string]interface{}) {
|
||||
author["displayName"] = "System"
|
||||
}
|
||||
|
||||
|
||||
/* convert the timestamp */
|
||||
sent_dt, _ := time.Parse("2006-01-02T15:04:05.000000000Z", rawmsg["timestamp"].(string))
|
||||
|
||||
@@ -93,19 +92,19 @@ func oc_process_message(rawmsg map[string]interface{}) {
|
||||
|
||||
/* check for authenticated role */
|
||||
if _, ok := author["authenticated"]; ok && author["authenticated"].(bool) == true {
|
||||
out_message.Type += "-authenticated"
|
||||
out_message.Type += "^authenticated"
|
||||
}
|
||||
|
||||
/* check for bot role */
|
||||
if _, ok := author["isBot"]; ok && author["isBot"].(bool) == true {
|
||||
out_message.Type += "-bot"
|
||||
out_message.Type += "^bot"
|
||||
}
|
||||
|
||||
/* add display color hint */
|
||||
if _, ok := author["displayColor"]; ok {
|
||||
dcolor := int(author["displayColor"].(float64))
|
||||
if dcolor > 0 {
|
||||
out_message.Type += fmt.Sprintf("-occolor%d", dcolor)
|
||||
out_message.Type += fmt.Sprintf("^occolor%d", dcolor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user