Skip to content

Commit

Permalink
Fix lark notifications not being sent (#161)
Browse files Browse the repository at this point in the history
Lark still tries to parse "<img>" tags inside of code block. I replace "<" with unicode character "<" to fix this
  • Loading branch information
nt0xa authored Feb 9, 2024
1 parent 034b510 commit e6e54d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/modules/lark/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ func (lrk *Lark) Notify(n *modules.Notification) error {
}

for _, m := range emailRegexp.FindAllString(body, -1) {
body = strings.ReplaceAll(body, m, strings.Replace(m, "@", "(AT)", 1))
body = strings.ReplaceAll(body, m, strings.Replace(m, "@", "", 1))
}

body = strings.ReplaceAll(body, "<img", "<img")

config := larkcard.NewMessageCardConfig().
WideScreenMode(true).
EnableForward(true).
Expand Down

0 comments on commit e6e54d7

Please sign in to comment.