mirror of
https://github.com/pushbits/server.git
synced 2025-05-28 00:06:41 +02:00
adopt to review
change formatting options to separate struct and clean up
This commit is contained in:
parent
fe1cbdf79e
commit
2ff9f5972a
6 changed files with 22 additions and 20 deletions
|
@ -32,12 +32,8 @@ func (d *Dispatcher) getFormattedTitle(n *model.Notification) string {
|
|||
trimmedTitle := strings.TrimSpace(n.Title)
|
||||
title := html.EscapeString(trimmedTitle)
|
||||
|
||||
if valueRaw, ok := d.settings["coloredtitle"]; ok {
|
||||
value, ok := valueRaw.(bool)
|
||||
|
||||
if ok && value {
|
||||
title = d.coloredText(d.priorityToColor(n.Priority), title)
|
||||
}
|
||||
if d.formatting.ColoredTitle {
|
||||
title = d.coloredText(d.priorityToColor(n.Priority), title)
|
||||
}
|
||||
|
||||
return "<b>" + title + "</b><br /><br />"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue