Merge lp:~nikwen/account-polld/trim-message into lp:~ubuntu-push-hackers/account-polld/trunk

Proposed by Niklas Wenzel
Status: Needs review
Proposed branch: lp:~nikwen/account-polld/trim-message
Merge into: lp:~ubuntu-push-hackers/account-polld/trunk
Diff against target: 20 lines (+2/-1)
1 file modified
plugins/plugins.go (+2/-1)
To merge this branch: bzr merge lp:~nikwen/account-polld/trim-message
Reviewer Review Type Date Requested Status
Ubuntu Push Hackers Pending
Review via email: mp+287422@code.launchpad.net

Commit message

Trim the notification body

Description of the change

Trim the notification body

It does not make sense to have any leading or trailing spaces as we want to display the message's content.

To post a comment you must log in.

Unmerged revisions

152. By Niklas Wenzel

Trim the notification body

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/plugins.go'
--- plugins/plugins.go 2015-03-20 14:34:48 +0000
+++ plugins/plugins.go 2016-02-28 23:02:11 +0000
@@ -24,6 +24,7 @@
24 "os"24 "os"
25 "path/filepath"25 "path/filepath"
26 "reflect"26 "reflect"
27 "strings"
2728
28 "launchpad.net/account-polld/accounts"29 "launchpad.net/account-polld/accounts"
29 "launchpad.net/go-xdg/v0"30 "launchpad.net/go-xdg/v0"
@@ -60,7 +61,7 @@
60 Notification: Notification{61 Notification: Notification{
61 Card: &Card{62 Card: &Card{
62 Summary: summary,63 Summary: summary,
63 Body: body,64 Body: strings.TrimSpace(body),
64 Actions: []string{action},65 Actions: []string{action},
65 Icon: icon,66 Icon: icon,
66 Timestamp: epoch,67 Timestamp: epoch,

Subscribers

People subscribed via source and target branches