Fix golint issues
This commit is contained in:
parent
f62b27f332
commit
c3386ba118
@ -128,8 +128,7 @@ func (action *PushAction) MarshalJSON() (raw []byte, err error) {
|
|||||||
"value": action.Value,
|
"value": action.Value,
|
||||||
}
|
}
|
||||||
return json.Marshal(&data)
|
return json.Marshal(&data)
|
||||||
} else {
|
}
|
||||||
data := string(action.Action)
|
data := string(action.Action)
|
||||||
return json.Marshal(&data)
|
return json.Marshal(&data)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -62,10 +62,9 @@ func ParseMessage(matrix ifc.MatrixContainer, room *rooms.Room, evt *gomatrix.Ev
|
|||||||
if hasFormat && format == "org.matrix.custom.html" {
|
if hasFormat && format == "org.matrix.custom.html" {
|
||||||
text := ParseHTMLMessage(room, evt, displayname)
|
text := ParseHTMLMessage(room, evt, displayname)
|
||||||
return messages.NewExpandedTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
|
return messages.NewExpandedTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
|
||||||
} else {
|
}
|
||||||
text, _ := evt.Content["body"].(string)
|
text, _ := evt.Content["body"].(string)
|
||||||
return messages.NewTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
|
return messages.NewTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
|
||||||
}
|
|
||||||
case "m.image":
|
case "m.image":
|
||||||
url, _ := evt.Content["url"].(string)
|
url, _ := evt.Content["url"].(string)
|
||||||
data, hs, id, err := matrix.Download(url)
|
data, hs, id, err := matrix.Download(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user