Use right variable for value array

This commit is contained in:
Peter Stuifzand 2018-05-03 07:27:31 +02:00
parent 7fe800f0f9
commit f943507d0d

View File

@ -283,8 +283,8 @@ func mapToItem(result map[string]interface{}) microsub.Item {
if value, e := result["in-reply-to"]; e {
if replyTo, ok := value.(string); ok {
item.InReplyTo = append(item.InReplyTo, replyTo)
} else if replyTo, ok := value.([]interface{}); ok {
for _, v := range value.([]interface{}) {
} else if valueArray, ok := value.([]interface{}); ok {
for _, v := range valueArray.([]interface{}) {
if replyTo, ok := v.(string); ok {
item.InReplyTo = append(item.InReplyTo, replyTo)
} else if cite, ok := v.(map[string]interface{}); ok {