correctly handle attachments mimetype and set proper msgtype, fixes #27

This commit is contained in:
Aine
2022-09-13 17:21:00 +03:00
parent 7e92c023c8
commit 76bffd931c
5 changed files with 37 additions and 4 deletions

View File

@@ -171,7 +171,7 @@ func (b *Bot) sendFiles(ctx context.Context, roomID id.RoomID, files []*utils.Fi
continue
}
_, err = b.lp.Send(roomID, &event.MessageEventContent{
MsgType: event.MsgFile,
MsgType: file.MsgType,
Body: req.FileName,
URL: resp.ContentURI.CUString(),
RelatesTo: utils.RelatesTo(!noThreads, parentID),