mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 12:50:27 +00:00
Fix regression in ReplaceMessages and ReplaceNicks. Closes #407
This commit is contained in:
parent
c3174f4de9
commit
b69fc30902
@ -243,11 +243,18 @@ func (c *Config) GetStringSlice(key string) []string {
|
|||||||
func (c *Config) GetStringSlice2D(key string) [][]string {
|
func (c *Config) GetStringSlice2D(key string) [][]string {
|
||||||
c.RLock()
|
c.RLock()
|
||||||
defer c.RUnlock()
|
defer c.RUnlock()
|
||||||
if res, ok := c.v.Get(key).([][]string); ok {
|
result := [][]string{}
|
||||||
return res
|
if res, ok := c.v.Get(key).([]interface{}); ok {
|
||||||
|
for _, entry := range res {
|
||||||
|
result2 := []string{}
|
||||||
|
for _, entry2 := range entry.([]interface{}) {
|
||||||
|
result2 = append(result2, entry2.(string))
|
||||||
}
|
}
|
||||||
// log.Debugf("getting StringSlice2D %s = %#v", key, c.v.Get(key))
|
result = append(result, result2)
|
||||||
return [][]string{}
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetIconURL(msg *Message, iconURL string) string {
|
func GetIconURL(msg *Message, iconURL string) string {
|
||||||
|
Loading…
Reference in New Issue
Block a user