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

Proposed by Niklas Wenzel on 2016-02-28
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 2016-02-28 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 on 2016-02-28

Trim the notification body

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/plugins.go'
2--- plugins/plugins.go 2015-03-20 14:34:48 +0000
3+++ plugins/plugins.go 2016-02-28 23:02:11 +0000
4@@ -24,6 +24,7 @@
5 "os"
6 "path/filepath"
7 "reflect"
8+ "strings"
9
10 "launchpad.net/account-polld/accounts"
11 "launchpad.net/go-xdg/v0"
12@@ -60,7 +61,7 @@
13 Notification: Notification{
14 Card: &Card{
15 Summary: summary,
16- Body: body,
17+ Body: strings.TrimSpace(body),
18 Actions: []string{action},
19 Icon: icon,
20 Timestamp: epoch,

Subscribers

People subscribed via source and target branches