Skip to content

Commit

Permalink
Merge pull request #21 from chuangzhu/malformed-event
Browse files Browse the repository at this point in the history
Fix "Malformed event" on Cinny
  • Loading branch information
duo authored Mar 10, 2023
2 parents 599f6f8 + ddb60e1 commit d3709a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,12 @@ func (user *User) sendQR(ce *WrappedCommandEvent, qrCode []byte, prevEvent id.Ev
}
content := event.MessageEventContent{
MsgType: event.MsgImage,
Body: "",
Body: "qrcode",
URL: url.CUString(),
Info: &event.FileInfo{
MimeType: "image/png",
Size: len(qrCode),
},
}
if len(prevEvent) != 0 {
content.SetEdit(prevEvent)
Expand Down

0 comments on commit d3709a4

Please sign in to comment.