Skip to content

Commit

Permalink
Fix reminder text when using html formatted messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrin committed Jun 9, 2023
1 parent 4b9bd20 commit 2b9317d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bot/cmd_remind.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ func remind(roomID, sender, msg, msgType, formattedBody string) {
return
}

formattedParams := strings.SplitN(msg, " ", 3)
var reminderText string
if msgType == "org.matrix.custom.html" {
reminderText = formattedBody
if msgType == "org.matrix.custom.html" && len(formattedParams) >= 3 {
reminderText = formattedParams[2]
} else {
reminderText = strings.Replace(params[2], "\n", "<br>", -1)
}
Expand Down

0 comments on commit 2b9317d

Please sign in to comment.