Skip to content

Commit

Permalink
Merge pull request #11 from quexten/feature/notification-icon-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Apr 30, 2024
2 parents 868abfe + a21edbe commit a9536c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion notification/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func Add(id uint, content Content) error {
data := map[string]dbus.Variant{
"title": convert.FromString(content.Title),
"body": convert.FromString(content.Body),
"icon": convert.FromString(content.Icon),
}

// Only add the icon field when it is set
if content.Icon != "" {
data["icon"] = convert.FromString(content.Icon)
}

// Only add the priority field when it is set.
Expand Down

0 comments on commit a9536c1

Please sign in to comment.