fix attachments msg type parser

This commit is contained in:
Aine
2022-09-13 18:35:19 +03:00
parent af3e23f630
commit c9d76a913e

View File

@@ -48,7 +48,7 @@ func mimeMsgType(mime string) event.MessageType {
if !strings.Contains(mime, "/") {
return event.MsgFile
}
msection := strings.SplitN(mime, "/", 1)[0]
msection := strings.Split(mime, "/")[0]
switch msection {
case "image":
return event.MsgImage